Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
95676115
Commit
95676115
authored
Nov 10, 2002
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix syntax to be more clean:
SHOW CREATE DATABASE [WITH IF NOT EXISTS] dbname
parent
95ffd436
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
client/mysqldump.c
client/mysqldump.c
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+6
-2
No files found.
client/mysqldump.c
View file @
95676115
...
@@ -1252,7 +1252,7 @@ static int init_dumping(char *database)
...
@@ -1252,7 +1252,7 @@ static int init_dumping(char *database)
MYSQL_ROW
row
;
MYSQL_ROW
row
;
MYSQL_RES
*
dbinfo
;
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
)))
if
(
mysql_query
(
sock
,
qbuf
)
||
!
(
dbinfo
=
mysql_store_result
(
sock
)))
{
{
...
...
sql/sql_yacc.yy
View file @
95676115
...
@@ -549,7 +549,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
...
@@ -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
type int_type real_type order_dir opt_field_spec lock_option
udf_type if_exists opt_local opt_table_options table_options
udf_type if_exists opt_local opt_table_options table_options
table_option opt_if_not_exists opt_var_type opt_var_ident_type
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>
%type <ulong_num>
ULONG_NUM raid_types merge_insert_types
ULONG_NUM raid_types merge_insert_types
...
@@ -878,6 +878,10 @@ opt_if_not_exists:
...
@@ -878,6 +878,10 @@ opt_if_not_exists:
/* empty */ { $$= 0; }
/* empty */ { $$= 0; }
| IF NOT EXISTS { $$=HA_LEX_CREATE_IF_NOT_EXISTS; };
| 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:
opt_create_table_options:
/* empty */
/* empty */
| create_table_options;
| create_table_options;
...
@@ -3106,7 +3110,7 @@ show_param:
...
@@ -3106,7 +3110,7 @@ show_param:
lex->grant_user=$3;
lex->grant_user=$3;
lex->grant_user->password.str=NullS;
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->sql_command=SQLCOM_SHOW_CREATE_DB;
Lex->create_info.options=$3;
Lex->create_info.options=$3;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment