Added --compatible mode to mysqldump.

parent 94cc7d75
...@@ -38,4 +38,5 @@ enum options { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, ...@@ -38,4 +38,5 @@ enum options { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,
OPT_SSL_KEY, OPT_SSL_CERT, OPT_SSL_CA, OPT_SSL_CAPATH, OPT_SSL_KEY, OPT_SSL_CERT, OPT_SSL_CA, OPT_SSL_CAPATH,
OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE, OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE,
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL, OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM }; OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION,
OPT_COMPATIBLE };
This diff is collapsed.
...@@ -70,7 +70,7 @@ t1 CREATE TABLE `t1` ( ...@@ -70,7 +70,7 @@ t1 CREATE TABLE `t1` (
`email` varchar(60) NOT NULL default '', `email` varchar(60) NOT NULL default '',
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
UNIQUE KEY `email` (`email`) UNIQUE KEY `email` (`email`)
) TYPE=HEAP CHARSET=latin1 ROW_FORMAT=DYNAMIC ) TYPE=HEAP ROW_FORMAT=DYNAMIC
set @@sql_mode="postgresql,oracle,mssql,db2,sapdb"; set @@sql_mode="postgresql,oracle,mssql,db2,sapdb";
show variables like 'sql_mode'; show variables like 'sql_mode';
Variable_name Value Variable_name Value
......
...@@ -1198,7 +1198,9 @@ store_create_info(THD *thd, TABLE *table, String *packet) ...@@ -1198,7 +1198,9 @@ store_create_info(THD *thd, TABLE *table, String *packet)
char buff[128]; char buff[128];
char* p; char* p;
if (table->table_charset) if (table->table_charset &&
!(thd->variables.sql_mode & MODE_MYSQL323) &&
!(thd->variables.sql_mode & MODE_MYSQL40))
{ {
packet->append(" CHARSET="); packet->append(" CHARSET=");
packet->append(table->table_charset->csname); packet->append(table->table_charset->csname);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment