summaryrefslogtreecommitdiff
path: root/mysql-test/t/archive.test
diff options
context:
space:
mode:
authorSergey Vojtovich <sergey.vojtovich@oracle.com>2010-12-01 15:56:46 +0300
committerSergey Vojtovich <sergey.vojtovich@oracle.com>2010-12-01 15:56:46 +0300
commit21779b35eaf0bbbd9aad6c220012a12ff001cc11 (patch)
treed49a55d8fe727fc8e448bd19790e7a10d42b9902 /mysql-test/t/archive.test
parent7009fd0e7d72327d11c53b180f05e80d64eff522 (diff)
downloadmariadb-git-21779b35eaf0bbbd9aad6c220012a12ff001cc11.tar.gz
BUG#58205 - Valgrind failure in fn_format when called from
archive_discover Fixed buffer underrun in cleanup_dirname(). Also fixed that original (unencoded) database and table names were used to discover archive tables. mysql-test/r/archive.result: A test case for BUG#58205. mysql-test/t/archive.test: A test case for BUG#58205. mysys/mf_pack.c: Fixed buffer underrun in cleanup_dirname(), when it gets path like "a/../" (relative path, where first directory is to be cut off). storage/archive/ha_archive.cc: Handler discover method gets database and table names as is. It must use build_table_filename() to get name similar to what it gets on create() and open().
Diffstat (limited to 'mysql-test/t/archive.test')
-rw-r--r--mysql-test/t/archive.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test
index c3a080612a9..ce5047124a2 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -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@002f.frm;
+DROP TABLE `a/../`;