summaryrefslogtreecommitdiff
path: root/mysql-test/t/sql_mode.test
diff options
context:
space:
mode:
authorunknown <acurtis@xiphis.org>2005-06-17 22:14:44 +0100
committerunknown <acurtis@xiphis.org>2005-06-17 22:14:44 +0100
commit6c085d9f9d1fce0b8652f91f85b018e5815aac13 (patch)
tree2ba5a923fd8c126d9ccb26dc09b9d5d14f52b50f /mysql-test/t/sql_mode.test
parent7f269ebba04c5e6e645d9871af8a555628986430 (diff)
downloadmariadb-git-6c085d9f9d1fce0b8652f91f85b018e5815aac13.tar.gz
Bug#6877 MySQL should give an error if the requested table type is not available
Implement new SQL mode - NO_ENGINE_SUBSTITUTION mysql-test/r/sql_mode.result: Test for bug 6877 mysql-test/t/sql_mode.test: Test for bug 6877 sql/handler.cc: change to ha_checktype() sql/handler.h: change to ha_checktype() sql/mysql_priv.h: new sql mode NO_ENGINE_SUBSTITUTION change to args for get_table_type() and create_frm() sql/mysqld.cc: new sql mode NO_ENGINE_SUBSTITUTION sql/set_var.cc: change to ha_checktype() args sql/sql_delete.cc: change to get_table_type() args sql/sql_rename.cc: change to get_table_type() args sql/sql_table.cc: move common code to check_engine() change to ha_checktype(), get_table_type() args sql/table.cc: change to ha_checktype(), create_frm(), get_table_type() args sql/unireg.cc: change to create_frm() args
Diffstat (limited to 'mysql-test/t/sql_mode.test')
-rw-r--r--mysql-test/t/sql_mode.test20
1 files changed, 20 insertions, 0 deletions
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;