summaryrefslogtreecommitdiff
path: root/mysql-test/t/sql_mode.test
diff options
context:
space:
mode:
authorunknown <jani@rhols221.adsl.netsonic.fi>2003-01-16 02:04:50 +0200
committerunknown <jani@rhols221.adsl.netsonic.fi>2003-01-16 02:04:50 +0200
commiteb56d5e46838266cb97095dc23c97cec88e2b06d (patch)
tree5910d263a2db0a8c8e0feac4478908fc202a92db /mysql-test/t/sql_mode.test
parent27bce4b3e121144caabc67c3466d45588c8488cd (diff)
downloadmariadb-git-eb56d5e46838266cb97095dc23c97cec88e2b06d.tar.gz
Added support sql_mode, which can be used to produce various outputs
of SHOW CREATE TABLE 'name'. Depending on the mode, the output can be compatible with various databases, including earlier versions of MySQL . sql/field.cc: Added support for sql_mode. Changed find_set() to be aware of possible error. If the argument contains a value that is not legal in the set, err_pos and err_len are set. sql/field.h: Added support for sql_mode. Changed find_set() to be aware of possible error. If the argument contains a value that is not legal in the set, err_pos and err_len are set. sql/item_func.cc: Added support for sql_mode. sql/mysql_priv.h: Some new sql modes. sql/mysqld.cc: Added support for sql mode, including some new modes. sql/set_var.cc: Added support for sql_mode. Added function that can be used to check values in a set. sql/set_var.h: Added support for sql_mode. Added function that can be used to check values in a set. sql/sql_class.cc: Removed previous usage of opt_sql_mode. sql/sql_class.h: Removed previous usage of opt_sql_mode. sql/sql_lex.cc: Changed previous version of sql_mode to the new noe. sql/sql_parse.cc: Changed previous version of sql_mode to the new noe. sql/sql_select.cc: Changed previous version of sql_mode to the new noe. sql/sql_show.cc: Added support for various sql_modes for printing CREATE TABLE. sql/sql_yacc.yy: Changed previous version of sql_mode to the new noe.
Diffstat (limited to 'mysql-test/t/sql_mode.test')
-rw-r--r--mysql-test/t/sql_mode.test30
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test
new file mode 100644
index 00000000000..fd464f74de4
--- /dev/null
+++ b/mysql-test/t/sql_mode.test
@@ -0,0 +1,30 @@
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+CREATE TABLE `t1` (
+ a int not null auto_increment,
+ `pseudo` varchar(35) character set latin2 NOT NULL default '',
+ `email` varchar(60) character set latin2 NOT NULL default '',
+ PRIMARY KEY (a),
+ UNIQUE KEY `email` USING BTREE (`email`)
+) TYPE=HEAP CHARSET=latin1 ROW_FORMAT DYNAMIC;
+set @@sql_mode="";
+show variables like 'sql_mode';
+show create table t1;
+set @@sql_mode="ansi_quotes";
+show variables like 'sql_mode';
+show create table t1;
+set @@sql_mode="no_table_options";
+show variables like 'sql_mode';
+show create table t1;
+set @@sql_mode="no_key_options";
+show variables like 'sql_mode';
+show create table t1;
+set @@sql_mode="no_field_options,mysql323,mysql40";
+show variables like 'sql_mode';
+show create table t1;
+set @@sql_mode="postgresql,oracle,mssql,db2,sapdb";
+show variables like 'sql_mode';
+show create table t1;
+drop table t1;