summaryrefslogtreecommitdiff
path: root/mysql-test/suite/archive
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-08-07 18:06:56 +0200
committerSergei Golubchik <sergii@pisem.net>2014-08-07 18:06:56 +0200
commit6fb17a06016506498f4de75ff754f500f9f674f1 (patch)
treed03c86959f150edc0f6f27ca2c06ccbc0e6e5bf0 /mysql-test/suite/archive
parent2023fac28130d7d3f7d6776332239c62c3890195 (diff)
parenta4ab2431a20f6e2198d980f8e84fa7118515ca3b (diff)
downloadmariadb-git-6fb17a06016506498f4de75ff754f500f9f674f1.tar.gz
5.5.39 merge
Diffstat (limited to 'mysql-test/suite/archive')
-rw-r--r--mysql-test/suite/archive/partition_archive.result26
-rw-r--r--mysql-test/suite/archive/partition_archive.test18
2 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/suite/archive/partition_archive.result b/mysql-test/suite/archive/partition_archive.result
index bb3e531a2ed..eb1fca46522 100644
--- a/mysql-test/suite/archive/partition_archive.result
+++ b/mysql-test/suite/archive/partition_archive.result
@@ -127,3 +127,29 @@ select count(*) from t1;
count(*)
100
drop table t1;
+#
+#BUG 18618561: FAILED ALTER TABLE ENGINE CHANGE WITH PARTITIONS
+# CORRUPTS FRM
+CREATE TABLE t1 (fld1 INT PRIMARY KEY) ENGINE= MYISAM PARTITION BY HASH(fld1)
+PARTITIONS 5;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `fld1` int(11) NOT NULL,
+ PRIMARY KEY (`fld1`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (fld1)
+PARTITIONS 5 */
+ALTER TABLE t1 ENGINE= ARCHIVE;
+ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+#After the patch, the ENGINE is correctly displayed as MyISAM
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `fld1` int(11) NOT NULL,
+ PRIMARY KEY (`fld1`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (fld1)
+PARTITIONS 5 */
+#Cleanup.
+DROP TABLE t1;
diff --git a/mysql-test/suite/archive/partition_archive.test b/mysql-test/suite/archive/partition_archive.test
index be2abeada73..899f266c09c 100644
--- a/mysql-test/suite/archive/partition_archive.test
+++ b/mysql-test/suite/archive/partition_archive.test
@@ -129,3 +129,21 @@ show create table t1;
select count(*) from t1;
drop table t1;
+
+--echo #
+--echo #BUG 18618561: FAILED ALTER TABLE ENGINE CHANGE WITH PARTITIONS
+--echo # CORRUPTS FRM
+
+CREATE TABLE t1 (fld1 INT PRIMARY KEY) ENGINE= MYISAM PARTITION BY HASH(fld1)
+PARTITIONS 5;
+SHOW CREATE TABLE t1;
+
+--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
+--error ER_CANT_CREATE_TABLE
+ALTER TABLE t1 ENGINE= ARCHIVE;
+
+--echo #After the patch, the ENGINE is correctly displayed as MyISAM
+SHOW CREATE TABLE t1;
+
+--echo #Cleanup.
+DROP TABLE t1;