diff options
author | monty@hundin.mysql.fi <> | 2002-03-06 23:41:18 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2002-03-06 23:41:18 +0200 |
commit | e9ba8d58feb15dba676e5603f9c4134f1d411c79 (patch) | |
tree | 8004cb532c51b6a2c9f603271702236358f167cb /client | |
parent | c00ddbab5477d623ce00046e43fc0573052219e1 (diff) | |
parent | 35462001696d14b8f71bc4589fad3de63680eeed (diff) | |
download | mariadb-git-e9ba8d58feb15dba676e5603f9c4134f1d411c79.tar.gz |
merge
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 2 | ||||
-rw-r--r-- | client/mysqldump.c | 15 |
2 files changed, 9 insertions, 8 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 769b4490096..df329b04481 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -38,7 +38,7 @@ #include <signal.h> #include <violite.h> -const char *VER="11.20"; +const char *VER="11.21"; /* Don't try to make a nice table if the data is too big */ #define MAX_COLUMN_LENGTH 1024 diff --git a/client/mysqldump.c b/client/mysqldump.c index da708849992..c2e3d7dad3c 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -35,7 +35,7 @@ ** and adapted to mysqldump 05/11/01 by Jani Tolonen */ -#define DUMP_VERSION "8.22" +#define DUMP_VERSION "8.23" #include <my_global.h> #include <my_sys.h> @@ -897,8 +897,6 @@ static uint getTableStructure(char *table, char* db) fputs(";\n", sql_file); } } - if (opt_disable_keys) - fprintf(sql_file,"\n/*!40000 ALTER TABLE %s DISABLE KEYS */;\n",table_name); if (cFlag) { strpos=strmov(strpos,") VALUES "); @@ -1023,7 +1021,7 @@ static void dumpTable(uint numFields, char *table) strxmov(strend(query), " WHERE ",where,NullS); } if (!opt_xml) - fputs("\n\n", md_result_file); + fputs("\n", md_result_file); if (mysql_query(sock, query)) { DBerror(sock, "when retrieving data from server"); @@ -1048,6 +1046,9 @@ static void dumpTable(uint numFields, char *table) return; } + if (opt_disable_keys) + fprintf(md_result_file,"/*!40000 ALTER TABLE %s DISABLE KEYS */;\n", + quote_name(table, table_buff)); if (opt_lock) fprintf(md_result_file,"LOCK TABLES %s WRITE;\n", quote_name(table,table_buff)); @@ -1207,11 +1208,11 @@ static void dumpTable(uint numFields, char *table) safe_exit(EX_CONSCHECK); return; } - if (opt_disable_keys) - fprintf(md_result_file,"\n/*!40000 ALTER TABLE %s ENABLE KEYS */;\n", - quote_name(table,table_buff)); if (opt_lock) fputs("UNLOCK TABLES;\n", md_result_file); + if (opt_disable_keys) + fprintf(md_result_file,"/*!40000 ALTER TABLE %s ENABLE KEYS */;\n", + quote_name(table,table_buff)); if (opt_autocommit) fprintf(md_result_file, "commit;\n"); mysql_free_result(res); |