Commit 14c767ca authored by Sergei Golubchik's avatar Sergei Golubchik

fix typo: binlog_annotate_rows_events -> binlog_annotate_row_events

parent 9ea133fb
......@@ -109,7 +109,7 @@ static ulonglong rec_count= 0;
static short binlog_flags = 0;
static MYSQL* mysql = NULL;
static const char* dirname_for_local_load= 0;
static bool opt_skip_annotate_rows_events= 0;
static bool opt_skip_annotate_row_events= 0;
/**
Pointer to the Format_description_log_event of the currently active binlog.
......@@ -1020,7 +1020,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
break;
}
case ANNOTATE_ROWS_EVENT:
if (!opt_skip_annotate_rows_events)
if (!opt_skip_annotate_row_events)
{
/*
We don't print Annotate event just now because all subsequent
......@@ -1328,10 +1328,10 @@ that may lead to an endless loop.",
"Updates to a database with a different name than the original. \
Example: rewrite-db='from->to'.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"skip-annotate-rows-events", OPT_SKIP_ANNOTATE_ROWS_EVENTS,
{"skip-annotate-row-events", OPT_SKIP_ANNOTATE_ROWS_EVENTS,
"Don't print Annotate_rows events stored in the binary log.",
(uchar**) &opt_skip_annotate_rows_events,
(uchar**) &opt_skip_annotate_rows_events,
(uchar**) &opt_skip_annotate_row_events,
(uchar**) &opt_skip_annotate_row_events,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
......@@ -1815,7 +1815,7 @@ static Exit_status dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
cast to uint32.
*/
int4store(buf, (uint32)start_position);
if (!opt_skip_annotate_rows_events)
if (!opt_skip_annotate_row_events)
binlog_flags|= BINLOG_SEND_ANNOTATE_ROWS_EVENT;
int2store(buf + BIN_LOG_HEADER_SIZE, binlog_flags);
......
########################################################################
# WL47: Store in binlog text of statements that caused RBR events
# new event : ANNOTATE_ROWS_EVENT
# new master option : --binlog-annotate-rows-events
# new slave option : --replicate-annotate-rows-events
# new master option : --binlog-annotate-row-events
# new slave option : --replicate-annotate-row-events
########################################################################
--source include/master-slave.inc
connect (master2,127.0.0.1,root,,test,$MASTER_MYPORT,);
......@@ -29,11 +29,11 @@ CREATE TABLE t5 (
b VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_bin
);
SET SESSION binlog_annotate_rows_events = OFF;
SET SESSION binlog_annotate_row_events = OFF;
INSERT INTO t1 VALUES (0,0), (1,1);
SET SESSION binlog_annotate_rows_events = ON;
SET SESSION binlog_annotate_row_events = ON;
UPDATE t1 SET b = b + 1;
REPLACE t1 VALUES (1,1), (2,2), (3,3);
......@@ -84,7 +84,7 @@ SELECT * FROM t5 ORDER BY a;
--echo ########################################################################
--echo # EVENTS ON SLAVE
let $annotate= `select @@global.replicate_annotate_rows_events`;
let $annotate= `select @@global.replicate_annotate_row_events`;
if ($annotate)
{
--echo # The following Annotate_rows events should appear below:
......@@ -116,7 +116,7 @@ let $start_pos= `select @binlog_start_pos`;
--echo # INSERTs DELAYED ON MASTERs
--echo ########################################################################
connection master;
SET SESSION binlog_annotate_rows_events = ON;
SET SESSION binlog_annotate_row_events = ON;
INSERT DELAYED INTO test1.t4 VALUES (1,1);
FLUSH TABLES;
SELECT * FROM test1.t4 ORDER BY a;
......
......@@ -427,7 +427,7 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
#
#####################################################################################
# mysqlbinlog --skip-annotate-rows-events
# mysqlbinlog --skip-annotate-row-events
# No Annotates should appear in this output
#####################################################################################
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
......@@ -1013,7 +1013,7 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
#
#####################################################################################
# mysqlbinlog --read-from-remote-server --skip-annotate-rows-events
# mysqlbinlog --read-from-remote-server --skip-annotate-row-events
# No Annotates should appear in this output
#####################################################################################
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
......
###############################################################################
# WL47: Store in binlog text of statements that caused RBR events
# new event: ANNOTATE_ROWS_EVENT
# new master option: --binlog-annotate-rows-events
# new mysqlbinlog option: --skip-annotate-rows-events
# new master option: --binlog-annotate-row-events
# new mysqlbinlog option: --skip-annotate-row-events
#
# Intended to test that:
# *** If the --binlog-annotate-rows-events option is switched on on master
# *** If the --binlog-annotate-row-events option is switched on on master
# then Annotate_rows events:
# - are generated;
# - are genrated only once for "multi-table-maps" rbr queries;
......@@ -13,9 +13,9 @@
# - are generated when the corresponding queries are filtered away partialy
# (e.g. in case of multi-delete).
# *** Annotate_rows events are printed by mysqlbinlog started without
# --skip-annotate-rows-events options both in remote and local cases.
# --skip-annotate-row-events options both in remote and local cases.
# *** Annotate_rows events are not printed by mysqlbinlog started with
# --skip-annotate-rows-events options both in remote and local cases.
# --skip-annotate-row-events options both in remote and local cases.
###############################################################################
--source include/have_log_bin.inc
......@@ -54,11 +54,11 @@ CREATE TABLE xtest1.xt1(a int);
CREATE DATABASE xtest2;
CREATE TABLE xtest2.xt2(a int);
# By default SESSION binlog_annotate_rows_events = OFF
# By default SESSION binlog_annotate_row_events = OFF
INSERT INTO test1.t1 VALUES (1), (2), (3);
SET SESSION binlog_annotate_rows_events = ON;
SET SESSION binlog_annotate_row_events = ON;
INSERT INTO test2.t2 VALUES (1), (2), (3);
INSERT INTO test3.t3 VALUES (1), (2), (3);
......@@ -133,13 +133,13 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--echo #
--echo #####################################################################################
--echo # mysqlbinlog --skip-annotate-rows-events
--echo # mysqlbinlog --skip-annotate-row-events
--echo # No Annotates should appear in this output
--echo #####################################################################################
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-rows-events -v -v $MYSQLD_DATADIR/master-bin.000001
--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-row-events -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
--echo #####################################################################################
......@@ -169,13 +169,13 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--echo #
--echo #####################################################################################
--echo # mysqlbinlog --read-from-remote-server --skip-annotate-rows-events
--echo # mysqlbinlog --read-from-remote-server --skip-annotate-row-events
--echo # No Annotates should appear in this output
--echo #####################################################################################
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-rows-events -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
--exec $MYSQL_BINLOG --base64-output=decode-rows --skip-annotate-row-events -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
# Clean-up
......
......@@ -127,7 +127,7 @@ slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
########################################################################
# INSERTs DELAYED ON MASTERs
########################################################################
SET SESSION binlog_annotate_rows_events = ON;
SET SESSION binlog_annotate_row_events = ON;
INSERT DELAYED INTO test1.t4 VALUES (1,1);
FLUSH TABLES;
SELECT * FROM test1.t4 ORDER BY a;
......
......@@ -109,7 +109,7 @@ slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
########################################################################
# INSERTs DELAYED ON MASTERs
########################################################################
SET SESSION binlog_annotate_rows_events = ON;
SET SESSION binlog_annotate_row_events = ON;
INSERT DELAYED INTO test1.t4 VALUES (1,1);
FLUSH TABLES;
SELECT * FROM test1.t4 ORDER BY a;
......
--log-slave-updates --replicate-annotate-rows-events --replicate-ignore-table=test1.xt1 --replicate-ignore-table=test1.xt2
\ No newline at end of file
--log-slave-updates --replicate-annotate-row-events --replicate-ignore-table=test1.xt1 --replicate-ignore-table=test1.xt2
###############################################################################
# WL47: Store in binlog text of statements that caused RBR events
# Wrapper for extra/rpl/rpl_row_annotate.test.
# Intended to test that if the --replicate-annotate-rows-events option
# Intended to test that if the --replicate-annotate-row-events option
# is switched on on slave then Annotate_events:
# - are reproduced on slave
# - are reproduced only once for "multi-table-maps" rbr queries
......
###############################################################################
# WL47: Store in binlog text of statements that caused RBR events
# Wrapper for extra/rpl/rpl_row_annotate.test.
# Intended to test that if the --replicate-annotate-rows-events option
# Intended to test that if the --replicate-annotate-row-events option
# is switched off on slave then Annotate_events are not reproduced.
###############################################################################
......
......@@ -4721,7 +4721,7 @@ static bool check_table_binlog_row_based(THD *thd, TABLE *table)
/** @brief
Write table maps for all (manually or automatically) locked tables
to the binary log. Also, if binlog_annotate_rows_events is ON,
to the binary log. Also, if binlog_annotate_row_events is ON,
write Annotate_rows event before the first table map.
SYNOPSIS
......@@ -4759,7 +4759,7 @@ static int write_locked_table_maps(THD *thd)
locks[0]= thd->extra_lock;
locks[1]= thd->lock;
locks[2]= thd->locked_tables;
my_bool with_annotate= thd->variables.binlog_annotate_rows_events &&
my_bool with_annotate= thd->variables.binlog_annotate_row_events &&
thd->query() && thd->query_length();
for (uint i= 0 ; i < sizeof(locks)/sizeof(*locks) ; ++i )
......
......@@ -3082,7 +3082,7 @@ char *str_to_hex(char *to, const char *from, uint len);
/**
@class Annotate_rows_log_event
In row-based mode, if binlog_annotate_rows_events = ON, each group of
In row-based mode, if binlog_annotate_row_events = ON, each group of
Table_map_log_events is preceded by an Annotate_rows_log_event which
contains the query which caused the subsequent rows operations.
......
......@@ -567,7 +567,7 @@ my_bool opt_local_infile, opt_slave_compressed_protocol;
my_bool opt_safe_user_create = 0, opt_no_mix_types = 0;
my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0;
my_bool opt_log_slave_updates= 0;
my_bool opt_replicate_annotate_rows_events= 0;
my_bool opt_replicate_annotate_row_events= 0;
bool slave_warning_issued = false;
/*
......@@ -6230,17 +6230,17 @@ struct my_option my_long_options[] =
#endif
, &opt_binlog_format, &opt_binlog_format,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"binlog-annotate-rows-events", OPT_BINLOG_ANNOTATE_ROWS_EVENTS,
{"binlog-annotate-row-events", OPT_BINLOG_ANNOTATE_ROWS_EVENTS,
"Tells the master to annotate RBR events with the statement that "
"caused these events.",
(uchar**) &global_system_variables.binlog_annotate_rows_events,
(uchar**) &max_system_variables.binlog_annotate_rows_events,
(uchar**) &global_system_variables.binlog_annotate_row_events,
(uchar**) &max_system_variables.binlog_annotate_row_events,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"replicate-annotate-rows-events", OPT_REPLICATE_ANNOTATE_ROWS_EVENTS,
{"replicate-annotate-row-events", OPT_REPLICATE_ANNOTATE_ROWS_EVENTS,
"Tells the slave to write annotate rows events recieved from the master "
"to its own binary log. Sensible only in pair with log-slave-updates option.",
(uchar**) &opt_replicate_annotate_rows_events,
(uchar**) &opt_replicate_annotate_rows_events,
(uchar**) &opt_replicate_annotate_row_events,
(uchar**) &opt_replicate_annotate_row_events,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"binlog-do-db", OPT_BINLOG_DO_DB,
"Tells the master it should log updates for the specified database, "
......
......@@ -425,14 +425,14 @@ class Relay_log_info : public Slave_reporting_capability
/**
Save pointer to Annotate_rows event and switch on the
binlog_annotate_rows_events for this sql thread.
binlog_annotate_row_events for this sql thread.
To be called when sql thread recieves an Annotate_rows event.
*/
inline void set_annotate_event(Annotate_rows_log_event *event)
{
free_annotate_event();
m_annotate_event= event;
sql_thd->variables.binlog_annotate_rows_events= 1;
sql_thd->variables.binlog_annotate_row_events= 1;
}
/**
......@@ -446,7 +446,7 @@ class Relay_log_info : public Slave_reporting_capability
/**
Delete saved Annotate_rows event (if any) and switch off the
binlog_annotate_rows_events for this sql thread.
binlog_annotate_row_events for this sql thread.
To be called when sql thread has applied the last (i.e. with
STMT_END_F flag) rbr event.
*/
......@@ -454,7 +454,7 @@ class Relay_log_info : public Slave_reporting_capability
{
if (m_annotate_event)
{
sql_thd->variables.binlog_annotate_rows_events= 0;
sql_thd->variables.binlog_annotate_row_events= 0;
delete m_annotate_event;
m_annotate_event= 0;
}
......
......@@ -189,8 +189,8 @@ static sys_var_const sys_back_log(&vars, "back_log",
(uchar*) &back_log);
static sys_var_const_os_str sys_basedir(&vars, "basedir", mysql_home);
static sys_var_thd_bool
sys_binlog_annotate_rows_events(&vars, "binlog_annotate_rows_events",
&SV::binlog_annotate_rows_events);
sys_binlog_annotate_row_events(&vars, "binlog_annotate_row_events",
&SV::binlog_annotate_row_events);
static sys_var_long_ptr sys_binlog_cache_size(&vars, "binlog_cache_size",
&binlog_cache_size);
static sys_var_thd_binlog_format sys_binlog_format(&vars, "binlog_format",
......
......@@ -2013,7 +2013,7 @@ static int request_dump(MYSQL* mysql, Master_info* mi,
*suppress_warnings= FALSE;
if (opt_log_slave_updates && opt_replicate_annotate_rows_events)
if (opt_log_slave_updates && opt_replicate_annotate_row_events)
binlog_flags|= BINLOG_SEND_ANNOTATE_ROWS_EVENT;
// TODO if big log files: Change next to int8store()
......@@ -3077,11 +3077,11 @@ pthread_handler_t handle_slave_sql(void *arg)
thd->temporary_tables = rli->save_temporary_tables; // restore temp tables
set_thd_in_use_temporary_tables(rli); // (re)set sql_thd in use for saved temp tables
/*
binlog_annotate_rows_events must be TRUE only after an Annotate_rows event
binlog_annotate_row_events must be TRUE only after an Annotate_rows event
has been recieved and only till the last corresponding rbr event has been
applied. In all other cases it must be FALSE.
*/
thd->variables.binlog_annotate_rows_events= 0;
thd->variables.binlog_annotate_row_events= 0;
pthread_mutex_lock(&LOCK_thread_count);
threads.append(thd);
pthread_mutex_unlock(&LOCK_thread_count);
......
......@@ -106,7 +106,7 @@ extern MYSQL_PLUGIN_IMPORT char *relay_log_info_file;
extern char *opt_relay_logname, *opt_relaylog_index_name;
extern my_bool opt_skip_slave_start, opt_reckless_slave;
extern my_bool opt_log_slave_updates;
extern my_bool opt_replicate_annotate_rows_events;
extern my_bool opt_replicate_annotate_row_events;
extern ulonglong relay_log_space_limit;
/*
......
......@@ -460,7 +460,7 @@ struct system_variables
ulong ndb_index_stat_update_freq;
ulong binlog_format; // binlog format for this thd (see enum_binlog_format)
ulong progress_report_time;
my_bool binlog_annotate_rows_events;
my_bool binlog_annotate_row_events;
my_bool binlog_direct_non_trans_update;
/*
In slave thread we need to know in behalf of which
......
......@@ -2010,7 +2010,7 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list)
/*
Annotating delayed inserts is not supported.
*/
di->thd.variables.binlog_annotate_rows_events= 0;
di->thd.variables.binlog_annotate_row_events= 0;
di->thd.set_db(table_list->db, (uint) strlen(table_list->db));
di->thd.set_query(my_strdup(table_list->table_name, MYF(MY_WME)), 0);
......
......@@ -1978,10 +1978,10 @@ static sys_var_const sys_log_slave_updates(&vars, "log_slave_updates",
OPT_GLOBAL, SHOW_MY_BOOL,
(uchar*) &opt_log_slave_updates);
static sys_var_const
sys_replicate_annotate_rows_events(&vars,
"replicate_annotate_rows_events",
sys_replicate_annotate_row_events(&vars,
"replicate_annotate_row_events",
OPT_GLOBAL, SHOW_MY_BOOL,
(uchar*) &opt_replicate_annotate_rows_events);
(uchar*) &opt_replicate_annotate_row_events);
static sys_var_const sys_relay_log(&vars, "relay_log",
OPT_GLOBAL, SHOW_CHAR_PTR,
(uchar*) &opt_relay_logname);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment