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
3839e912
Commit
3839e912
authored
May 30, 2015
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-8248: mysqldump incorrect identifier quoting during equality comparison
Use quote_for_equal to correctly escape characters.
parent
ae4b2434
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
client/mysqldump.c
client/mysqldump.c
+5
-2
No files found.
client/mysqldump.c
View file @
3839e912
...
...
@@ -2630,6 +2630,7 @@ static uint get_table_structure(char *table, char *db, char *table_type,
const
char
*
insert_option
;
char
name_buff
[
NAME_LEN
+
3
],
table_buff
[
NAME_LEN
*
2
+
3
];
char
table_buff2
[
NAME_LEN
*
2
+
3
],
query_buff
[
QUERY_LENGTH
];
char
temp_buff
[
NAME_LEN
*
2
+
3
],
temp_buff2
[
NAME_LEN
*
2
+
3
];
const
char
*
show_fields_stmt
=
"SELECT `COLUMN_NAME` AS `Field`, "
"`COLUMN_TYPE` AS `Type`, "
"`IS_NULLABLE` AS `Null`, "
...
...
@@ -2638,7 +2639,7 @@ static uint get_table_structure(char *table, char *db, char *table_type,
"`EXTRA` AS `Extra`, "
"`COLUMN_COMMENT` AS `Comment` "
"FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE "
"TABLE_SCHEMA =
'%s' AND TABLE_NAME = '%s'
"
;
"TABLE_SCHEMA =
%s AND TABLE_NAME = %s
"
;
FILE
*
sql_file
=
md_result_file
;
int
len
;
my_bool
is_log_table
;
...
...
@@ -2944,7 +2945,9 @@ static uint get_table_structure(char *table, char *db, char *table_type,
verbose_msg
(
"%s: Warning: Can't set SQL_QUOTE_SHOW_CREATE option (%s)
\n
"
,
my_progname_short
,
mysql_error
(
mysql
));
my_snprintf
(
query_buff
,
sizeof
(
query_buff
),
show_fields_stmt
,
db
,
table
);
my_snprintf
(
query_buff
,
sizeof
(
query_buff
),
show_fields_stmt
,
quote_for_equal
(
db
,
temp_buff
),
quote_for_equal
(
table
,
temp_buff2
));
if
(
mysql_query_with_error_report
(
mysql
,
&
result
,
query_buff
))
DBUG_RETURN
(
0
);
...
...
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