3178 Sergey Vojtovich 2010-12-08 [merge]
Merge fix for BUG58205 to 5.5-bugteam.
modified:
mysql-test/r/archive.result
mysql-test/t/archive.test
mysys/mf_pack.c
storage/archive/ha_archive.cc
3177 Marc Alff 2010-12-07
Bug#58798 SHOW ENGINE PERFORMANCE_SCHEMA STATUS: incorrect table lettercase
Before this fix, the output of SHOW ENGINE PERFORMANCE_SCHEMA STATUS
used uppercase to name performance schema tables.
This is inconsistent since performance schema tables have been renamed to lowercase.
Also, an old table 'PROCESSLIST' was still visible,
even after this table got renamed to 'threads'.
This fix:
- correctly uses lowercases in the output, to match the current naming.
- replaced 'PROCESSLIST' with 'threads'.
Tested the output of SHOW ENGINE PERFORMANCE_SCHEMA STATUS manually.
No automated test cases can be written for this,
since the output is too platform dependent (sizes).
modified:
storage/perfschema/pfs_engine_table.cc
=== modified file 'mysql-test/r/archive.result'
--- a/mysql-test/r/archive.result 2010-07-26 15:54:20 +0000
+++ b/mysql-test/r/archive.result 2010-12-01 12:56:46 +0000
@@ -12801,3 +12801,9 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
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/../`;
=== modified file 'mysql-test/t/archive.test'
--- a/mysql-test/t/archive.test 2010-07-26 15:54:20 +0000
+++ b/mysql-test/t/archive.test 2010-12-01 12:56:46 +0000
@@ -1722,3 +1722,11 @@ INSERT INTO t1 VALUES (2);
SELECT * FROM t1 ORDER BY a;
SHOW CREATE 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@002f@002e@002e@stripped;
+DROP TABLE `a/../`;
=== modified file 'mysys/mf_pack.c'
--- a/mysys/mf_pack.c 2010-07-15 13:47:50 +0000
+++ b/mysys/mf_pack.c 2010-12-01 12:56:46 +0000
@@ -192,7 +192,8 @@ size_t cleanup_dirname(register char *to
end_parentdir=pos;
while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */
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/ */
pos=strmov(end_parentdir+1,parent);
*pos=FN_LIBCHAR;
=== modified file 'storage/archive/ha_archive.cc'
--- a/storage/archive/ha_archive.cc 2010-10-06 14:34:28 +0000
+++ b/storage/archive/ha_archive.cc 2010-12-01 12:56:46 +0000
@@ -20,6 +20,7 @@
#include "sql_priv.h"
#include "probes_mysql.h"
#include "sql_class.h" // SSV
+#include "sql_table.h"
#include <myisam.h>
#include "ha_archive.h"
@@ -256,7 +257,7 @@ int archive_discover(handlerton *hton, T
char *frm_ptr;
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))))
goto err;
Attachment: [text/bzr-bundle] bzr/sergey.vojtovich@oracle.com-20101208121011-gd8fvhvog8s3dfab.bundle
| Thread |
|---|
| • bzr push into mysql-5.5-bugteam branch (sergey.vojtovich:3177 to 3178) | Sergey Vojtovich | 8 Dec |