diff options
author | unknown <bell@sanja.is.com.ua> | 2005-06-18 20:11:41 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-06-18 20:11:41 +0300 |
commit | 16613aadbe6511d42e744954c0eddfc5adbde4b9 (patch) | |
tree | 22301ed4c3e2eef6a8cf813d677cf5d66b9f1228 /mysql-test | |
parent | f16b102f6b9afa06f431bdc72fcc2306f13d6a97 (diff) | |
parent | 0945dea8d08b13189691052b79fe2bd255e0f008 (diff) | |
download | mariadb-git-16613aadbe6511d42e744954c0eddfc5adbde4b9.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/sql_mode.result | 18 | ||||
-rw-r--r-- | mysql-test/t/sql_mode.test | 20 |
2 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index c5ba4d15a50..392bdda32e3 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -402,4 +402,22 @@ a\b a\"b a'\b a'\"b SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b"; a\b a\'b a"\b a"\'b a\b a\'b a"\b a"\'b +set session sql_mode = 'NO_ENGINE_SUBSTITUTION'; +create table t1 (a int) engine=isam; +ERROR HY000: The 'ISAM' feature is disabled; you need MySQL built with 'ISAM' to have it working +show create table t1; +ERROR 42S02: Table 'test.t1' doesn't exist +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +set session sql_mode = ''; +create table t1 (a int) engine=isam; +Warnings: +Warning 1266 Using storage engine MyISAM for table 't1' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; SET @@SQL_MODE=@OLD_SQL_MODE; diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test index 6a0c4aecada..26cb0944e3a 100644 --- a/mysql-test/t/sql_mode.test +++ b/mysql-test/t/sql_mode.test @@ -189,4 +189,24 @@ SET @@SQL_MODE=''; SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b'; SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b"; + +# +# Bug#6877: MySQL should give an error if the requested table type +# is not available +# + +set session sql_mode = 'NO_ENGINE_SUBSTITUTION'; +--error 1289 +create table t1 (a int) engine=isam; +--error 1146 +show create table t1; +drop table if exists t1; + +# for comparison, lets see the warnings... +set session sql_mode = ''; +create table t1 (a int) engine=isam; +show create table t1; +drop table t1; + + SET @@SQL_MODE=@OLD_SQL_MODE; |