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
cbe72dba
Commit
cbe72dba
authored
Jun 30, 2014
by
Marcin Babij
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#18779944: MYSQLDUMP BUFFER OVERFLOW
Reverted change due to mtr test failure.
parent
8e4ae8c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
28 deletions
+11
-28
client/mysqldump.c
client/mysqldump.c
+11
-28
No files found.
client/mysqldump.c
View file @
cbe72dba
...
@@ -5538,36 +5538,19 @@ int main(int argc, char **argv)
...
@@ -5538,36 +5538,19 @@ int main(int argc, char **argv)
dump_all_tablespaces
();
dump_all_tablespaces
();
dump_all_databases
();
dump_all_databases
();
}
}
else
if
(
argc
>
1
&&
!
opt_databases
)
{
/* Only one database and selected table(s) */
if
(
!
opt_alltspcs
&&
!
opt_notspcs
)
dump_tablespaces_for_tables
(
*
argv
,
(
argv
+
1
),
(
argc
-
1
));
dump_selected_tables
(
*
argv
,
(
argv
+
1
),
(
argc
-
1
));
}
else
else
{
{
// Check all arguments meet length condition. Currently database and table
/* One or more databases, all tables */
// names are limited to NAME_LEN bytes and stack-based buffers assumes
if
(
!
opt_alltspcs
&&
!
opt_notspcs
)
// that escaped name will be not longer than NAME_LEN*2 + 2 bytes long.
dump_tablespaces_for_databases
(
argv
);
int
argument
;
dump_databases
(
argv
);
for
(
argument
=
0
;
argument
<
argc
;
argument
++
)
{
size_t
argument_length
=
strlen
(
argv
[
argument
]);
if
(
argument_length
>
NAME_LEN
)
{
die
(
EX_CONSCHECK
,
"[ERROR] Argument '%s' is too long, it cannot be "
"name for any table or database.
\n
"
,
argv
[
argument
]);
}
}
if
(
argc
>
1
&&
!
opt_databases
)
{
/* Only one database and selected table(s) */
if
(
!
opt_alltspcs
&&
!
opt_notspcs
)
dump_tablespaces_for_tables
(
*
argv
,
(
argv
+
1
),
(
argc
-
1
));
dump_selected_tables
(
*
argv
,
(
argv
+
1
),
(
argc
-
1
));
}
else
{
/* One or more databases, all tables */
if
(
!
opt_alltspcs
&&
!
opt_notspcs
)
dump_tablespaces_for_databases
(
argv
);
dump_databases
(
argv
);
}
}
}
/* if --dump-slave , start the slave sql thread */
/* if --dump-slave , start the slave sql thread */
...
...
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