diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 11 | ||||
-rw-r--r-- | client/mysqldump.c | 12 |
2 files changed, 9 insertions, 14 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 5964d1eba3f..13f60fee64f 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -810,17 +810,6 @@ static int get_options(int argc, char **argv) return(0); } -#if defined(OS2) -static char* readline( char* prompt) -{ -#if defined(OS2) - static char linebuffer[254]; -#endif - puts( prompt); - return gets( linebuffer); -} -#endif - static int read_lines(bool execute_commands) { #if defined( __WIN__) || defined(OS2) diff --git a/client/mysqldump.c b/client/mysqldump.c index 3e374eb2b8d..0b9ff7a6eee 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -149,7 +149,7 @@ CHANGEABLE_VAR md_changeable_vars[] = { { "max_allowed_packet", (long*) &max_allowed_packet,24*1024*1024,4096, 512*1024L*1024L,MALLOC_OVERHEAD,1024}, { "net_buffer_length", (long*) &net_buffer_length,1024*1024L-1025,4096, - 512*1024L*1024L,MALLOC_OVERHEAD+1024,1024}, + 16*1024L*1024L,MALLOC_OVERHEAD-1024,1024}, { 0, 0, 0, 0, 0, 0, 0} }; @@ -651,7 +651,7 @@ static uint getTableStructure(char *table, char* db) /* Make an sql-file, if path was given iow. option -T was given */ char buff[20+FN_REFLEN]; - sprintf(buff,"show create table %s",table_name); + sprintf(buff,"show create table `%s`",table); if (mysql_query(sock, buff)) { fprintf(stderr, "%s: Can't get CREATE TABLE for table '%s' (%s)\n", @@ -784,7 +784,7 @@ static uint getTableStructure(char *table, char* db) { if (opt_keywords) fprintf(sql_file, " %s.%s %s", table_name, - quote_name(row[SHOW_FIELDNAME],name_buff), row[SHOW_TYPE]); + quote_name(row[SHOW_FIELDNAME],name_buff), row[SHOW_TYPE]); else fprintf(sql_file, " %s %s", quote_name(row[SHOW_FIELDNAME], name_buff), row[SHOW_TYPE]); @@ -1072,6 +1072,9 @@ static void dumpTable(uint numFields, char *table) fputs(insert_pat,md_result_file); mysql_field_seek(res,0); + if (opt_xml) + fprintf(md_result_file, "\t<row>\n"); + for (i = 0; i < mysql_num_fields(res); i++) { if (!(field = mysql_fetch_field(res))) @@ -1161,6 +1164,9 @@ static void dumpTable(uint numFields, char *table) } } + if (opt_xml) + fprintf(md_result_file, "\t</row>\n"); + if (extended_insert) { ulong row_length; |