1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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

@ -122,7 +122,7 @@ void lex_init(void)
state_map[(uchar)'*']= (uchar) STATE_END_LONG_COMMENT;
state_map[(uchar)'@']= (uchar) STATE_USER_END;
state_map[(uchar) '`']= (uchar) STATE_USER_VARIABLE_DELIMITER;
if (opt_sql_mode & MODE_ANSI_QUOTES)
if (global_system_variables.sql_mode & MODE_ANSI_QUOTES)
{
state_map[(uchar) '"'] = STATE_USER_VARIABLE_DELIMITER;
}
@ -167,7 +167,7 @@ LEX *lex_start(THD *thd, uchar *buf,uint length)
lex->convert_set= (lex->thd= thd)->variables.convert_set;
lex->thd_charset= lex->thd->variables.thd_charset;
lex->yacc_yyss=lex->yacc_yyvs=0;
lex->ignore_space=test(thd->sql_mode & MODE_IGNORE_SPACE);
lex->ignore_space=test(thd->variables.sql_mode & MODE_IGNORE_SPACE);
lex->slave_thd_opt=0;
lex->sql_command=SQLCOM_END;
lex->safe_to_cache_query= 1;