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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
85d130c5
Commit
85d130c5
authored
Jun 21, 2006
by
igreenhoe@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug #15977 (switch ordering of DISABLE KEYS/LOCK TABLE in mysqldump)
parent
52d86dff
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
62 deletions
+47
-62
client/mysqldump.c
client/mysqldump.c
+13
-10
mysql-test/r/mysqldump.result
mysql-test/r/mysqldump.result
+34
-52
No files found.
client/mysqldump.c
View file @
85d130c5
...
@@ -1722,15 +1722,16 @@ static void dumpTable(uint numFields, char *table)
...
@@ -1722,15 +1722,16 @@ static void dumpTable(uint numFields, char *table)
goto
err
;
goto
err
;
}
}
if
(
opt_
disable_keys
)
if
(
opt_
lock
)
{
{
fprintf
(
md_result_file
,
"
\n
/*!40000 ALTER TABLE %s DISABLE KEYS */;
\n
"
,
fprintf
(
md_result_file
,
"LOCK TABLES %s WRITE;
\n
"
,
opt_quoted_table
);
opt_quoted_table
);
check_io
(
md_result_file
);
check_io
(
md_result_file
);
}
}
if
(
opt_lock
)
/* Moved disable keys to after lock per bug 15977 */
if
(
opt_disable_keys
)
{
{
fprintf
(
md_result_file
,
"LOCK TABLES %s WRITE;
\n
"
,
opt_quoted_table
);
fprintf
(
md_result_file
,
"/*!40000 ALTER TABLE %s DISABLE KEYS */;
\n
"
,
opt_quoted_table
);
check_io
(
md_result_file
);
check_io
(
md_result_file
);
}
}
...
@@ -1991,17 +1992,19 @@ static void dumpTable(uint numFields, char *table)
...
@@ -1991,17 +1992,19 @@ static void dumpTable(uint numFields, char *table)
error
=
EX_CONSCHECK
;
error
=
EX_CONSCHECK
;
goto
err
;
goto
err
;
}
}
if
(
opt_lock
)
{
/* Moved enable keys to before unlock per bug 15977 */
fputs
(
"UNLOCK TABLES;
\n
"
,
md_result_file
);
check_io
(
md_result_file
);
}
if
(
opt_disable_keys
)
if
(
opt_disable_keys
)
{
{
fprintf
(
md_result_file
,
"/*!40000 ALTER TABLE %s ENABLE KEYS */;
\n
"
,
fprintf
(
md_result_file
,
"/*!40000 ALTER TABLE %s ENABLE KEYS */;
\n
"
,
opt_quoted_table
);
opt_quoted_table
);
check_io
(
md_result_file
);
check_io
(
md_result_file
);
}
}
if
(
opt_lock
)
{
fputs
(
"UNLOCK TABLES;
\n
"
,
md_result_file
);
check_io
(
md_result_file
);
}
if
(
opt_autocommit
)
if
(
opt_autocommit
)
{
{
fprintf
(
md_result_file
,
"commit;
\n
"
);
fprintf
(
md_result_file
,
"commit;
\n
"
);
...
...
mysql-test/r/mysqldump.result
View file @
85d130c5
This diff is collapsed.
Click to expand it.
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