|
30 | 30 | ** master/autocommit code by Brian Aker <[email protected]> |
31 | 31 | ** SSL by |
32 | 32 | ** Andrei Errapart <[email protected]> |
33 | | -** Tõnu Samuel <[email protected]> |
| 33 | +** Tõnu Samuel <[email protected]> |
34 | 34 | ** XML by Gary Huntress <[email protected]> 10/10/01, cleaned up |
35 | 35 | ** and adapted to mysqldump 05/11/01 by Jani Tolonen |
36 | 36 | ** Added --single-transaction option 06/06/2002 by Peter Zaitsev |
37 | 37 | ** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov |
38 | 38 | */ |
39 | 39 |
|
40 | | -#define DUMP_VERSION "10.11" |
| 40 | +#define DUMP_VERSION "10.12" |
41 | 41 |
|
42 | 42 | #include <my_global.h> |
43 | 43 | #include <my_sys.h> |
@@ -540,8 +540,10 @@ static void write_header(FILE *sql_file, char *db_name) |
540 | 540 | if (opt_xml) |
541 | 541 | { |
542 | 542 | fputs("<?xml version=\"1.0\"?>\n", sql_file); |
543 | | - /* Schema reference. Allows use of xsi:nil for NULL values and |
544 | | - xsi:type to define an element's data type. */ |
| 543 | + /* |
| 544 | + Schema reference. Allows use of xsi:nil for NULL values and |
| 545 | + xsi:type to define an element's data type. |
| 546 | + */ |
545 | 547 | fputs("<mysqldump ", sql_file); |
546 | 548 | fputs("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"", |
547 | 549 | sql_file); |
@@ -2349,7 +2351,7 @@ static void dump_table(char *table, char *db) |
2349 | 2351 | The "table" could be a view. If so, we don't do anything here. |
2350 | 2352 | */ |
2351 | 2353 | if (strcmp (table_type, "VIEW") == 0) |
2352 | | - return; |
| 2354 | + DBUG_VOID_RETURN; |
2353 | 2355 |
|
2354 | 2356 | /* Check --no-data flag */ |
2355 | 2357 | if (opt_no_data) |
@@ -2657,16 +2659,16 @@ static void dump_table(char *table, char *db) |
2657 | 2659 | { |
2658 | 2660 | if (opt_hex_blob && is_blob && length) |
2659 | 2661 | { |
2660 | | - /* Define xsi:type="xs:hexBinary" for hex encoded data */ |
2661 | | - print_xml_tag(md_result_file, "\t\t", "", "field", "name=", |
2662 | | - field->name, "xsi:type=", "xs:hexBinary", NullS); |
2663 | | - print_blob_as_hex(md_result_file, row[i], length); |
| 2662 | + /* Define xsi:type="xs:hexBinary" for hex encoded data */ |
| 2663 | + print_xml_tag(md_result_file, "\t\t", "", "field", "name=", |
| 2664 | + field->name, "xsi:type=", "xs:hexBinary", NullS); |
| 2665 | + print_blob_as_hex(md_result_file, row[i], length); |
2664 | 2666 | } |
2665 | 2667 | else |
2666 | 2668 | { |
2667 | | - print_xml_tag(md_result_file, "\t\t", "", "field", "name=", |
2668 | | - field->name, NullS); |
2669 | | - print_quoted_xml(md_result_file, row[i], length); |
| 2669 | + print_xml_tag(md_result_file, "\t\t", "", "field", "name=", |
| 2670 | + field->name, NullS); |
| 2671 | + print_quoted_xml(md_result_file, row[i], length); |
2670 | 2672 | } |
2671 | 2673 | fputs("</field>\n", md_result_file); |
2672 | 2674 | } |
@@ -3155,10 +3157,8 @@ static int dump_all_tables_in_db(char *database) |
3155 | 3157 | afterdot= strmov(hash_key, database); |
3156 | 3158 | *afterdot++= '.'; |
3157 | 3159 |
|
3158 | | - if (!strcmp(database, NDB_REP_DB)) /* Skip cluster internal database */ |
3159 | | - return 0; |
3160 | 3160 | if (init_dumping(database, init_dumping_tables)) |
3161 | | - return 1; |
| 3161 | + DBUG_RETURN(1); |
3162 | 3162 | if (opt_xml) |
3163 | 3163 | print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS); |
3164 | 3164 | if (lock_tables) |
@@ -3218,7 +3218,7 @@ static int dump_all_tables_in_db(char *database) |
3218 | 3218 | fprintf(md_result_file,"\n--\n-- Flush Grant Tables \n--\n"); |
3219 | 3219 | fprintf(md_result_file,"\n/*! FLUSH PRIVILEGES */;\n"); |
3220 | 3220 | } |
3221 | | - return 0; |
| 3221 | + DBUG_RETURN(0); |
3222 | 3222 | } /* dump_all_tables_in_db */ |
3223 | 3223 |
|
3224 | 3224 |
|
|
0 commit comments