From 315d7b3419fda7c4987c8f2c51d500ed2259899c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Feb 2008 20:55:04 +0200 Subject: Add warning of TRANSACTIONAL=1 is used with handler that doesn't support it Added hton_name() and handler->engine_name() and use these when appropriate KNOWN_BUGS.txt: Added some of the known bugs mysql-test/r/maria.result: Added test for TRANSACTIONAL=1 mysql-test/r/myisam.result: Added test for TRANSACTIONAL=1 mysql-test/t/maria.test: Added test for TRANSACTIONAL=1 mysql-test/t/myisam.test: Added test for TRANSACTIONAL=1 sql/handler.cc: ha_resolve_storage_engine_name() -> hton_name() sql/handler.h: Added hton_name() and handler->engine_name() sql/set_var.cc: Use hton_name() sql/sql_table.cc: Add warning of TRANSACTIONAL=1 is used with handler that doesn't support it Indentation fixes ha_resolve_storage_engine_name() -> hton_name() sql/sql_tablespace.cc: ha_resolve_storage_engine_name() -> hton_name() Indentation fixes sql/sql_yacc.yy: ha_resolve_storage_engine_name() -> hton_name() sql/unireg.cc: ha_resolve_storage_engine_name() -> hton_name() Indentation fixes --- mysql-test/r/maria.result | 33 +++++++++++++++++++++++++++++++++ mysql-test/r/myisam.result | 10 ++++++++++ mysql-test/t/maria.test | 20 +++++++++++++++++++- mysql-test/t/myisam.test | 7 +++++++ 4 files changed, 69 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/maria.result b/mysql-test/r/maria.result index ae6cc810b44..937241f2da8 100644 --- a/mysql-test/r/maria.result +++ b/mysql-test/r/maria.result @@ -2245,3 +2245,36 @@ n c 301 c 302 d drop table t1; +create table t1 (n int not null, c char(1)) engine=maria; +alter table t1 engine=myisam; +alter table t1 engine=maria; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `n` int(11) NOT NULL, + `c` char(1) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +drop table t1; +create table t1 (n int not null, c char(1)) engine=maria transactional=1; +alter table t1 engine=myisam; +Warnings: +Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1' +alter table t1 engine=maria; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `n` int(11) NOT NULL, + `c` char(1) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1 +drop table t1; +create table t1 (n int not null, c char(1)) engine=myisam transactional=1; +Warnings: +Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1' +alter table t1 engine=maria; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `n` int(11) NOT NULL, + `c` char(1) DEFAULT NULL +) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1 +drop table t1; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 9c861b446a4..3a0cbd3c32d 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -2023,4 +2023,14 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; +create table t1 (n int not null, c char(1)) transactional=1; +Warnings: +Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `n` int(11) NOT NULL, + `c` char(1) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 TRANSACTIONAL=1 +drop table t1; End of 5.1 tests diff --git a/mysql-test/t/maria.test b/mysql-test/t/maria.test index b354d161c4f..98ae5d1dd21 100644 --- a/mysql-test/t/maria.test +++ b/mysql-test/t/maria.test @@ -1454,8 +1454,26 @@ insert into t1 values(null, "d"); select * from t1; drop table t1; +# +# Test warnings with transactional=1 with MyISAM +# + +create table t1 (n int not null, c char(1)) engine=maria; +alter table t1 engine=myisam; +alter table t1 engine=maria; +show create table t1; +drop table t1; +create table t1 (n int not null, c char(1)) engine=maria transactional=1; +alter table t1 engine=myisam; +alter table t1 engine=maria; +show create table t1; +drop table t1; +create table t1 (n int not null, c char(1)) engine=myisam transactional=1; +alter table t1 engine=maria; +show create table t1; +drop table t1; -# End of 5.2 tests +# End of 5.1 tests --disable_result_log --disable_query_log diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 89ff1482b60..29df6a6e9c8 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1278,5 +1278,12 @@ DELETE FROM t1 WHERE c1 >= 10; CHECK TABLE t1; DROP TABLE t1; +# +# Test warnings with transactional=1 with MyISAM +# +create table t1 (n int not null, c char(1)) transactional=1; +show create table t1; +drop table t1; + --echo End of 5.1 tests -- cgit v1.2.1