diff options
author | unknown <knielsen@knielsen-hq.org> | 2011-08-12 13:18:34 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2011-08-12 13:18:34 +0200 |
commit | b1a13cb15a2cca5dece24c860f64b5ee012ed199 (patch) | |
tree | bad79ad136df284bd18281bbfff53a3fe48e8e0a /client | |
parent | c4d69f17753f375e8cfd18c33de291cdf13504f9 (diff) | |
download | mariadb-git-b1a13cb15a2cca5dece24c860f64b5ee012ed199.tar.gz |
MWL#234: After-review fixes, including better names for the new system variables.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqlbinlog.cc | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 40f0348d3a2..4b563090f25 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -671,7 +671,7 @@ print_use_stmt(PRINT_EVENT_INFO* pinfo, const Query_log_event *ev) /** - Print "SET do_not_replicate=..." statement when needed. + Print "SET skip_replication=..." statement when needed. Not all servers support this (only MariaDB from some version on). So we mark the SET to only execute from the version of MariaDB that supports it, @@ -679,20 +679,20 @@ print_use_stmt(PRINT_EVENT_INFO* pinfo, const Query_log_event *ev) get spurious errors on MySQL@Oracle servers of higher version that do not support the flag. - So we start out assuming @@do_not_replicate is 0, and only output a SET + So we start out assuming @@skip_replication is 0, and only output a SET statement when it changes. */ static void -print_do_not_replicate_statement(PRINT_EVENT_INFO *pinfo, const Log_event *ev) +print_skip_replication_statement(PRINT_EVENT_INFO *pinfo, const Log_event *ev) { int cur_val; - cur_val= (ev->flags & LOG_EVENT_DO_NOT_REPLICATE_F) != 0; - if (cur_val == pinfo->do_not_replicate) + cur_val= (ev->flags & LOG_EVENT_SKIP_REPLICATION_F) != 0; + if (cur_val == pinfo->skip_replication) return; /* Not changed. */ - fprintf(result_file, "/*!50400 SET do_not_replicate=%d*/%s\n", + fprintf(result_file, "/*!50400 SET skip_replication=%d*/%s\n", cur_val, pinfo->delimiter); - pinfo->do_not_replicate= cur_val; + pinfo->skip_replication= cur_val; } /** @@ -828,7 +828,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, } else { - print_do_not_replicate_statement(print_event_info, ev); + print_skip_replication_statement(print_event_info, ev); ev->print(result_file, print_event_info); } break; @@ -861,7 +861,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, } else { - print_do_not_replicate_statement(print_event_info, ev); + print_skip_replication_statement(print_event_info, ev); ce->print(result_file, print_event_info, TRUE); } @@ -958,10 +958,10 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, if (!shall_skip_database(exlq->db)) { print_use_stmt(print_event_info, exlq); - print_do_not_replicate_statement(print_event_info, ev); if (fname) { convert_path_to_forward_slashes(fname); + print_skip_replication_statement(print_event_info, ev); exlq->print(result_file, print_event_info, fname); } else @@ -1062,13 +1062,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, } /* FALL THROUGH */ } - case INTVAR_EVENT: - case RAND_EVENT: - case USER_VAR_EVENT: - case XID_EVENT: - print_do_not_replicate_statement(print_event_info, ev); - /* Fall through ... */ default: + print_skip_replication_statement(print_event_info, ev); ev->print(result_file, print_event_info); } } |