diff options
author | gshchepa/uchum@gleb.loc <> | 2007-09-05 11:35:29 +0500 |
---|---|---|
committer | gshchepa/uchum@gleb.loc <> | 2007-09-05 11:35:29 +0500 |
commit | adfbea368dc13412d901f6dac2ef8e5ec6c0822a (patch) | |
tree | 54adc23f3906efe6fc933b722353efcb5c830e94 /client/mysqldump.c | |
parent | c4811d67f7288ef74c795c9a6d7cf9aee2eab98b (diff) | |
download | mariadb-git-adfbea368dc13412d901f6dac2ef8e5ec6c0822a.tar.gz |
Fixed bug #29938.
mysqldump --skip-events --all-databases dumped data of the mysqld.event table,
and during the restoration from this dump events were created in spite
of the --skip-events option.
The mysqldump client has been modified to ignore mysql.event table data
in case of --skip-events options.
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r-- | client/mysqldump.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index 3d2aec92dea..e6b707f9811 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -3039,6 +3039,18 @@ static void dump_table(char *table, char *db) DBUG_VOID_RETURN; } + /* + Check --skip-events flag: it is not enough to skip creation of events + discarding SHOW CREATE EVENT statements generation. The myslq.event + table data should be skipped too. + */ + if (!opt_events && !my_strcasecmp(&my_charset_latin1, db, "mysql") && + !my_strcasecmp(&my_charset_latin1, table, "event")) + { + verbose_msg("-- Skipping data table mysql.event, --skip-events was used\n"); + DBUG_VOID_RETURN; + } + result_table= quote_name(table,table_buff, 1); opt_quoted_table= quote_name(table, table_buff2, 0); |