diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2009-11-24 12:08:04 +0100 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2009-11-24 12:08:04 +0100 |
commit | f52280cc427eb6f8e6744fe7f89e5d23ec4e914b (patch) | |
tree | 2c29ceb5006df7d9f3b7ca72eff46ab876370d46 /mysql-test | |
parent | ca595821498d6a547fa1780df86cdf127b0019b3 (diff) | |
download | mariadb-git-f52280cc427eb6f8e6744fe7f89e5d23ec4e914b.tar.gz |
merge of bug#35765 into mysql-next-mr-bugfixing
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/log_tables.result | 11 | ||||
-rw-r--r-- | mysql-test/r/partition.result | 36 | ||||
-rw-r--r-- | mysql-test/r/partition_innodb.result | 3 | ||||
-rw-r--r-- | mysql-test/t/log_tables.test | 21 | ||||
-rw-r--r-- | mysql-test/t/partition.test | 23 | ||||
-rw-r--r-- | mysql-test/t/partition_innodb.test | 1 |
6 files changed, 79 insertions, 16 deletions
diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result index f8321520880..80684e5f5d2 100644 --- a/mysql-test/r/log_tables.result +++ b/mysql-test/r/log_tables.result @@ -247,13 +247,10 @@ set global general_log='OFF'; set global slow_query_log='OFF'; set @save_storage_engine= @@session.storage_engine; set storage_engine= MEMORY; -alter table mysql.slow_log engine=ndb; -ERROR HY000: This storage engine cannot be used for log tables" -alter table mysql.slow_log engine=innodb; -ERROR HY000: This storage engine cannot be used for log tables" -alter table mysql.slow_log engine=archive; -ERROR HY000: This storage engine cannot be used for log tables" -alter table mysql.slow_log engine=blackhole; +alter table mysql.slow_log engine=NonExistentEngine; +Warnings: +Warning 1286 Unknown table engine 'NonExistentEngine' +alter table mysql.slow_log engine=memory; ERROR HY000: This storage engine cannot be used for log tables" set storage_engine= @save_storage_engine; drop table mysql.slow_log; diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 065e46dbf92..65ab29c37e8 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -81,6 +81,42 @@ INSERT INTO t1 VALUES (NULL); SELECT * FROM t1 WHERE pk < 0 ORDER BY pk; pk DROP TABLE t1; +CREATE TABLE t1 (a INT) +ENGINE=NonExistentEngine; +Warnings: +Warning 1286 Unknown table engine 'NonExistentEngine' +Warning 1266 Using storage engine MyISAM for table 't1' +DROP TABLE t1; +CREATE TABLE t1 (a INT) +ENGINE=NonExistentEngine +PARTITION BY HASH (a); +Warnings: +Warning 1286 Unknown table engine 'NonExistentEngine' +Warning 1266 Using storage engine MyISAM for table 't1' +DROP TABLE t1; +CREATE TABLE t1 (a INT) +ENGINE=Memory; +ALTER TABLE t1 ENGINE=NonExistentEngine; +Warnings: +Warning 1286 Unknown table engine 'NonExistentEngine' +ALTER TABLE t1 +PARTITION BY HASH (a) +(PARTITION p0 ENGINE=Memory, +PARTITION p1 ENGINE=NonExistentEngine); +Warnings: +Warning 1286 Unknown table engine 'NonExistentEngine' +ALTER TABLE t1 ENGINE=NonExistentEngine; +Warnings: +Warning 1286 Unknown table engine 'NonExistentEngine' +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY HASH (a) +(PARTITION p0 ENGINE = MEMORY, + PARTITION p1 ENGINE = MEMORY) */ +DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL, KEY(a)) PARTITION BY RANGE(a) (PARTITION p1 VALUES LESS THAN (200), PARTITION pmax VALUES LESS THAN MAXVALUE); diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index d95e7dc43fd..702a1bf8797 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -210,7 +210,8 @@ engine = innodb partition by list (a) (partition p0 values in (0)); alter table t1 engine = x; -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +Warnings: +Warning 1286 Unknown table engine 'x' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test index 076f2e8bc3b..5275b8e7db3 100644 --- a/mysql-test/t/log_tables.test +++ b/mysql-test/t/log_tables.test @@ -258,14 +258,21 @@ set global slow_query_log='OFF'; # check that alter table doesn't work for other engines set @save_storage_engine= @@session.storage_engine; set storage_engine= MEMORY; +# After fixing bug#35765 the error behaivor changed: +# If compiled in/enabled ER_UNSUPORTED_LOG_ENGINE +# If not (i.e. not existant) it will show a warning +# and use the current one. +alter table mysql.slow_log engine=NonExistentEngine; --error ER_UNSUPORTED_LOG_ENGINE -alter table mysql.slow_log engine=ndb; ---error ER_UNSUPORTED_LOG_ENGINE -alter table mysql.slow_log engine=innodb; ---error ER_UNSUPORTED_LOG_ENGINE -alter table mysql.slow_log engine=archive; ---error ER_UNSUPORTED_LOG_ENGINE -alter table mysql.slow_log engine=blackhole; +alter table mysql.slow_log engine=memory; +#--error ER_UNSUPORTED_LOG_ENGINE +#alter table mysql.slow_log engine=ndb; +#--error ER_UNSUPORTED_LOG_ENGINE +#alter table mysql.slow_log engine=innodb; +#--error ER_UNSUPORTED_LOG_ENGINE +#alter table mysql.slow_log engine=archive; +#--error ER_UNSUPORTED_LOG_ENGINE +#alter table mysql.slow_log engine=blackhole; set storage_engine= @save_storage_engine; drop table mysql.slow_log; diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 459acc9f1f5..58962519acf 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -98,6 +98,29 @@ SELECT * FROM t1 WHERE pk < 0 ORDER BY pk; DROP TABLE t1; # +# Bug#35765: ALTER TABLE produces wrong error when non-existent storage engine +# used +CREATE TABLE t1 (a INT) +ENGINE=NonExistentEngine; +DROP TABLE t1; +CREATE TABLE t1 (a INT) +ENGINE=NonExistentEngine +PARTITION BY HASH (a); +DROP TABLE t1; +CREATE TABLE t1 (a INT) +ENGINE=Memory; +ALTER TABLE t1 ENGINE=NonExistentEngine; +# OK to only specify one partitions engine, since it is already assigned at +# table level (after create, it is specified on all levels and all parts). +ALTER TABLE t1 +PARTITION BY HASH (a) +(PARTITION p0 ENGINE=Memory, + PARTITION p1 ENGINE=NonExistentEngine); +ALTER TABLE t1 ENGINE=NonExistentEngine; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +# # Bug#40494: Crash MYSQL server crashes on range access with partitioning # and order by # diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 2e08834cfc7..fe3a5be085c 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -250,7 +250,6 @@ engine = innodb partition by list (a) (partition p0 values in (0)); --- error ER_MIX_HANDLER_ERROR alter table t1 engine = x; show create table t1; drop table t1; |