diff options
author | unknown <igreenhoe/greenman@anubis.greendragongames.com> | 2006-07-14 06:52:25 -0700 |
---|---|---|
committer | unknown <igreenhoe/greenman@anubis.greendragongames.com> | 2006-07-14 06:52:25 -0700 |
commit | 2e3ed9c127f55473fc4239d271469870cf384a9a (patch) | |
tree | 20a2750b561c585f3eeb7c8395f63153253b9654 /client/mysqldump.c | |
parent | 1b6962a4847a90c908079919069ef3f71d17268d (diff) | |
parent | 23c514508e45cc179e750251d912da34ce8d404b (diff) | |
download | mariadb-git-2e3ed9c127f55473fc4239d271469870cf384a9a.tar.gz |
Merge igreenhoe@bk-internal.mysql.com:/home/bk/mysql-5.0
into anubis.greendragongames.com:/home/greenman/workspace-mysql/mysql/merge-4.1_2_5.0
client/mysqldump.c:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r-- | client/mysqldump.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index 9469815bfaf..4318e4b9528 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -2239,15 +2239,16 @@ static void dump_table(char *table, char *db) goto err; } - if (opt_disable_keys) + if (opt_lock) { - fprintf(md_result_file, "\n/*!40000 ALTER TABLE %s DISABLE KEYS */;\n", - opt_quoted_table); + fprintf(md_result_file,"LOCK TABLES %s WRITE;\n", opt_quoted_table); 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); } @@ -2511,17 +2512,19 @@ static void dump_table(char *table, char *db) error= EX_CONSCHECK; goto err; } - if (opt_lock) - { - fputs("UNLOCK TABLES;\n", md_result_file); - check_io(md_result_file); - } + + /* Moved enable keys to before unlock per bug 15977 */ if (opt_disable_keys) { fprintf(md_result_file,"/*!40000 ALTER TABLE %s ENABLE KEYS */;\n", opt_quoted_table); check_io(md_result_file); } + if (opt_lock) + { + fputs("UNLOCK TABLES;\n", md_result_file); + check_io(md_result_file); + } if (opt_autocommit) { fprintf(md_result_file, "commit;\n"); |