]> git.pld-linux.org Git - packages/mysql.git/blame - mysql-mysql_dump_ignore_ct.patch
remove id expansion
[packages/mysql.git] / mysql-mysql_dump_ignore_ct.patch
CommitLineData
8c0fcd57
ER
1# name : mysql_dump_ignore_ct.patch
2# introduced : 11 or before
3# maintainer : Yasufumi
4#
5#!!! notice !!!
6# Any small change to this file in the main branch
7# should be done or reviewed by the maintainer!
8diff -ruN a/client/client_priv.h b/client/client_priv.h
9--- a/client/client_priv.h 2010-04-06 23:03:48.000000000 +0900
10+++ b/client/client_priv.h 2010-04-30 19:37:42.000000000 +0900
11@@ -68,6 +68,7 @@
12 OPT_MYSQL_LOCK_DIRECTORY,
13 OPT_USE_THREADS,
14 OPT_IMPORT_USE_THREADS,
15+ OPT_IGNORE_CREATE_ERROR,
16 OPT_MYSQL_NUMBER_OF_QUERY,
17 OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
18 OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_CREATE_SLAP_SCHEMA,
19diff -ruN a/client/mysqldump.c b/client/mysqldump.c
20--- a/client/mysqldump.c 2010-04-06 23:03:49.000000000 +0900
21+++ b/client/mysqldump.c 2010-04-30 19:41:20.000000000 +0900
22@@ -98,7 +98,7 @@
23 opt_complete_insert= 0, opt_drop_database= 0,
24 opt_replace_into= 0,
25 opt_dump_triggers= 0, opt_routines=0, opt_tz_utc=1,
26- opt_events= 0,
27+ opt_events= 0, opt_ignore_show_create_table_error=0,
28 opt_alltspcs=0, opt_notspcs= 0;
29 static my_bool insert_pat_inited= 0, debug_info_flag= 0, debug_check_flag= 0;
30 static ulong opt_max_allowed_packet, opt_net_buffer_length;
31@@ -326,6 +326,9 @@
32 {"insert-ignore", OPT_INSERT_IGNORE, "Insert rows with INSERT IGNORE.",
33 &opt_ignore, &opt_ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
34 0, 0},
35+ {"ignore-create-error", OPT_IGNORE_CREATE_ERROR, "Don't exit on show create table errors.",
36+ (uchar**) &opt_ignore_show_create_table_error, (uchar**) &opt_ignore_show_create_table_error, 0, GET_BOOL,
37+ NO_ARG, 0, 0, 0, 0, 0, 0},
38 {"lines-terminated-by", OPT_LTB,
39 "Lines in the output file are terminated by the given string.",
40 &lines_terminated, &lines_terminated, 0, GET_STR,
41@@ -2303,13 +2306,21 @@
42 /* Make an sql-file, if path was given iow. option -T was given */
43 char buff[20+FN_REFLEN];
44 MYSQL_FIELD *field;
45+
46+ my_bool old_ignore_errors=ignore_errors;
47+ //fprintf(stderr, "ignore create table %d\n", opt_ignore_show_create_table_error);
48+ if (opt_ignore_show_create_table_error)
49+ ignore_errors=1;
50
51 my_snprintf(buff, sizeof(buff), "show create table %s", result_table);
52
53 if (switch_character_set_results(mysql, "binary") ||
54 mysql_query_with_error_report(mysql, &result, buff) ||
55 switch_character_set_results(mysql, default_charset))
56+ {
57+ ignore_errors=old_ignore_errors;
58 DBUG_RETURN(0);
59+ }
60
61 if (path)
62 {
This page took 0.043117 seconds and 4 git commands to generate.