Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
703014b8
Commit
703014b8
authored
Dec 08, 2010
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Plain Diff
Merge fix for BUG58205 to 5.5-bugteam.
parents
537366fd
45f6f933
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
2 deletions
+18
-2
mysql-test/r/archive.result
mysql-test/r/archive.result
+6
-0
mysql-test/t/archive.test
mysql-test/t/archive.test
+8
-0
mysys/mf_pack.c
mysys/mf_pack.c
+2
-1
storage/archive/ha_archive.cc
storage/archive/ha_archive.cc
+2
-1
No files found.
mysql-test/r/archive.result
View file @
703014b8
...
@@ -12801,3 +12801,9 @@ t1 CREATE TABLE `t1` (
...
@@ -12801,3 +12801,9 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
`a` int(11) DEFAULT NULL
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
DROP TABLE t1;
DROP TABLE t1;
#
# BUG#58205 - Valgrind failure in fn_format when called from
# archive_discover
#
CREATE TABLE `a/../`(a INT) ENGINE=ARCHIVE;
DROP TABLE `a/../`;
mysql-test/t/archive.test
View file @
703014b8
...
@@ -1722,3 +1722,11 @@ INSERT INTO t1 VALUES (2);
...
@@ -1722,3 +1722,11 @@ INSERT INTO t1 VALUES (2);
SELECT
*
FROM
t1
ORDER
BY
a
;
SELECT
*
FROM
t1
ORDER
BY
a
;
SHOW
CREATE
TABLE
t1
;
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# BUG#58205 - Valgrind failure in fn_format when called from
--
echo
# archive_discover
--
echo
#
CREATE
TABLE
`a/../`
(
a
INT
)
ENGINE
=
ARCHIVE
;
remove_file
$MYSQLD_DATADIR
/
test
/
a
@
002
f
@
002
e
@
002
e
@
002
f
.
frm
;
DROP
TABLE
`a/../`
;
mysys/mf_pack.c
View file @
703014b8
...
@@ -192,7 +192,8 @@ size_t cleanup_dirname(register char *to, const char *from)
...
@@ -192,7 +192,8 @@ size_t cleanup_dirname(register char *to, const char *from)
end_parentdir
=
pos
;
end_parentdir
=
pos
;
while
(
pos
>=
start
&&
*
pos
!=
FN_LIBCHAR
)
/* remove prev dir */
while
(
pos
>=
start
&&
*
pos
!=
FN_LIBCHAR
)
/* remove prev dir */
pos
--
;
pos
--
;
if
(
pos
[
1
]
==
FN_HOMELIB
||
memcmp
(
pos
,
parent
,
length
)
==
0
)
if
(
pos
[
1
]
==
FN_HOMELIB
||
(
pos
>
start
&&
memcmp
(
pos
,
parent
,
length
)
==
0
))
{
/* Don't remove ~user/ */
{
/* Don't remove ~user/ */
pos
=
strmov
(
end_parentdir
+
1
,
parent
);
pos
=
strmov
(
end_parentdir
+
1
,
parent
);
*
pos
=
FN_LIBCHAR
;
*
pos
=
FN_LIBCHAR
;
...
...
storage/archive/ha_archive.cc
View file @
703014b8
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include "sql_priv.h"
#include "sql_priv.h"
#include "probes_mysql.h"
#include "probes_mysql.h"
#include "sql_class.h" // SSV
#include "sql_class.h" // SSV
#include "sql_table.h"
#include <myisam.h>
#include <myisam.h>
#include "ha_archive.h"
#include "ha_archive.h"
...
@@ -256,7 +257,7 @@ int archive_discover(handlerton *hton, THD* thd, const char *db,
...
@@ -256,7 +257,7 @@ int archive_discover(handlerton *hton, THD* thd, const char *db,
char
*
frm_ptr
;
char
*
frm_ptr
;
MY_STAT
file_stat
;
MY_STAT
file_stat
;
fn_format
(
az_file
,
name
,
db
,
ARZ
,
MY_REPLACE_EXT
|
MY_UNPACK_FILENAME
);
build_table_filename
(
az_file
,
sizeof
(
az_file
)
-
1
,
db
,
name
,
ARZ
,
0
);
if
(
!
(
my_stat
(
az_file
,
&
file_stat
,
MYF
(
0
))))
if
(
!
(
my_stat
(
az_file
,
&
file_stat
,
MYF
(
0
))))
goto
err
;
goto
err
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment