1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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
.
This commit is contained in:
jani@rhols221.adsl.netsonic.fi
2003-01-16 02:04:50 +02:00
parent 5743f94b57
commit 94cc7d751e
16 changed files with 392 additions and 119 deletions

View File

@ -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;