mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fix syntax to be more clean:
SHOW CREATE DATABASE [WITH IF NOT EXISTS] dbname
This commit is contained in:
@ -1252,7 +1252,7 @@ static int init_dumping(char *database)
|
||||
MYSQL_ROW row;
|
||||
MYSQL_RES *dbinfo;
|
||||
|
||||
sprintf(qbuf,"SHOW CREATE DATABASE IF NOT EXISTS %s",database);
|
||||
sprintf(qbuf,"SHOW CREATE DATABASE WITH IF NOT EXISTS %s",database);
|
||||
|
||||
if (mysql_query(sock, qbuf) || !(dbinfo = mysql_store_result(sock)))
|
||||
{
|
||||
|
@ -549,7 +549,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
|
||||
type int_type real_type order_dir opt_field_spec lock_option
|
||||
udf_type if_exists opt_local opt_table_options table_options
|
||||
table_option opt_if_not_exists opt_var_type opt_var_ident_type
|
||||
delete_option
|
||||
delete_option opt_with_if_not_exists
|
||||
|
||||
%type <ulong_num>
|
||||
ULONG_NUM raid_types merge_insert_types
|
||||
@ -878,6 +878,10 @@ opt_if_not_exists:
|
||||
/* empty */ { $$= 0; }
|
||||
| IF NOT EXISTS { $$=HA_LEX_CREATE_IF_NOT_EXISTS; };
|
||||
|
||||
opt_with_if_not_exists:
|
||||
/* empty */ { $$= 0; }
|
||||
| WITH IF NOT EXISTS { $$=HA_LEX_CREATE_IF_NOT_EXISTS; };
|
||||
|
||||
opt_create_table_options:
|
||||
/* empty */
|
||||
| create_table_options;
|
||||
@ -3106,7 +3110,7 @@ show_param:
|
||||
lex->grant_user=$3;
|
||||
lex->grant_user->password.str=NullS;
|
||||
}
|
||||
| CREATE DATABASE opt_if_not_exists ident
|
||||
| CREATE DATABASE opt_with_if_not_exists ident
|
||||
{
|
||||
Lex->sql_command=SQLCOM_SHOW_CREATE_DB;
|
||||
Lex->create_info.options=$3;
|
||||
|
Reference in New Issue
Block a user