diff options
author | igreenhoe/greenman@anubis.greendragongames.com <> | 2006-07-13 16:35:25 -0700 |
---|---|---|
committer | igreenhoe/greenman@anubis.greendragongames.com <> | 2006-07-13 16:35:25 -0700 |
commit | abb75129f8318564be9730cb0b909702df9816ef (patch) | |
tree | ade4a3fc40348d0802ec1bbd31d554eaa91edfd3 /client | |
parent | 878107eb4a232cf5097601bec3fa1e8c28d7aca6 (diff) | |
parent | b4c8f536619d594326cdb7b9eade41262670358e (diff) | |
download | mariadb-git-abb75129f8318564be9730cb0b909702df9816ef.tar.gz |
4.1 -> 5.0 merge
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 2 | ||||
-rw-r--r-- | client/mysqldump.c | 23 |
2 files changed, 14 insertions, 11 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index ddfcc5759ae..94b43d030e8 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1084,7 +1084,7 @@ static int read_and_execute(bool interactive) (We want to allow help, print and clear anywhere at line start */ if ((named_cmds || glob_buffer.is_empty()) - && !in_string && (com=find_command(line,0))) + && !ml_comment && !in_string && (com=find_command(line,0))) { if ((*com->func)(&glob_buffer,line) > 0) break; diff --git a/client/mysqldump.c b/client/mysqldump.c index 53cb06be6f3..a59c6746134 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"); |