Commit 556155c2 authored by unknown's avatar unknown

Fix to not replicate mysql.event table

Test fixes


mysql-test/r/binlog_stm_ctype_cp932.result:
  Fixed result file
mysql-test/r/rpl_switch_stm_row_mixed.result:
  Fixed result file
mysql-test/t/disabled.def:
  Disabled test case
mysql-test/t/rpl_switch_stm_row_mixed.test:
  Fix test
sql/handler.cc:
  Fix to not replicate mysql.event table
parent e3d9ea2d
......@@ -11352,3 +11352,4 @@ col1
a
a
a
drop table t1;
......@@ -139,66 +139,64 @@ select * from t1 where a="alarm";
a
show binlog events from 102;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 102 Query 1 205 drop database if exists mysqltest1
master-bin.000001 205 Table_map 1 262 table_id: 15 (mysql.proc)
master-bin.000001 262 Write_rows 1 291 table_id: 4294967295 flags: STMT_END_F
master-bin.000001 291 Table_map 1 349 table_id: 16 (mysql.event)
master-bin.000001 349 Write_rows 1 378 table_id: 4294967295 flags: STMT_END_F
master-bin.000001 378 Query 1 473 create database mysqltest1
master-bin.000001 473 Query 1 574 use `mysqltest1`; CREATE TABLE t1 (a varchar(100))
master-bin.000001 574 Table_map 1 619 table_id: 17 (mysqltest1.t1)
master-bin.000001 619 Write_rows 1 648 table_id: 4294967295 flags: STMT_END_F
master-bin.000001 648 Table_map 1 693 table_id: 17 (mysqltest1.t1)
master-bin.000001 693 Write_rows 1 728 table_id: 17 flags: STMT_END_F
master-bin.000001 728 Table_map 1 773 table_id: 17 (mysqltest1.t1)
master-bin.000001 773 Write_rows 1 849 table_id: 17 flags: STMT_END_F
master-bin.000001 849 Table_map 1 894 table_id: 17 (mysqltest1.t1)
master-bin.000001 894 Write_rows 1 923 table_id: 4294967295 flags: STMT_END_F
master-bin.000001 923 Table_map 1 968 table_id: 17 (mysqltest1.t1)
master-bin.000001 968 Write_rows 1 1039 table_id: 17 flags: STMT_END_F
master-bin.000001 1039 Table_map 1 1084 table_id: 17 (mysqltest1.t1)
master-bin.000001 1084 Write_rows 1 1124 table_id: 17 flags: STMT_END_F
master-bin.000001 1124 Table_map 1 1169 table_id: 17 (mysqltest1.t1)
master-bin.000001 1169 Write_rows 1 1239 table_id: 17 flags: STMT_END_F
master-bin.000001 1239 Table_map 1 1284 table_id: 17 (mysqltest1.t1)
master-bin.000001 1284 Write_rows 1 1324 table_id: 17 flags: STMT_END_F
master-bin.000001 1324 Table_map 1 1369 table_id: 17 (mysqltest1.t1)
master-bin.000001 1369 Write_rows 1 1403 table_id: 17 flags: STMT_END_F
master-bin.000001 1403 Query 1 1501 use `mysqltest1`; insert into t1 values("work")
master-bin.000001 1501 User var 1 1549 @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci
master-bin.000001 1549 Query 1 1649 use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 1649 Query 1 1747 use `mysqltest1`; insert into t1 values("work")
master-bin.000001 1747 User var 1 1795 @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci
master-bin.000001 1795 Query 1 1895 use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 1895 Query 1 1992 use `mysqltest1`; insert into t1 values("for")
master-bin.000001 1992 Query 1 2094 use `mysqltest1`; insert into t1 select "yesterday"
master-bin.000001 2094 Query 1 2192 use `mysqltest1`; insert into t1 values("work")
master-bin.000001 2192 User var 1 2240 @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci
master-bin.000001 2240 Query 1 2340 use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 2340 Query 1 2438 use `mysqltest1`; insert into t1 values("work")
master-bin.000001 2438 User var 1 2486 @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci
master-bin.000001 2486 Query 1 2586 use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 2586 Query 1 2683 use `mysqltest1`; insert into t1 values("for")
master-bin.000001 2683 Query 1 2785 use `mysqltest1`; insert into t1 select "yesterday"
master-bin.000001 2785 Query 1 2883 use `mysqltest1`; insert into t1 values("work")
master-bin.000001 2883 Write_rows 1 2959 table_id: 17 flags: STMT_END_F
master-bin.000001 2959 Write_rows 1 3030 table_id: 17 flags: STMT_END_F
master-bin.000001 3030 User var 1 3078 @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci
master-bin.000001 3078 Query 1 3178 use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 3178 Write_rows 1 3248 table_id: 17 flags: STMT_END_F
master-bin.000001 3248 Query 1 3350 use `mysqltest1`; insert into t1 select "yesterday"
master-bin.000001 3350 Write_rows 1 3421 table_id: 17 flags: STMT_END_F
master-bin.000001 3421 User var 1 3469 @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci
master-bin.000001 3469 Query 1 3569 use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 3569 Write_rows 1 3639 table_id: 17 flags: STMT_END_F
master-bin.000001 3639 Query 1 3741 use `mysqltest1`; insert into t1 select "yesterday"
master-bin.000001 3741 Query 1 3953 use `mysqltest1`; create procedure foo()
master-bin.000001 # Query 1 # drop database if exists mysqltest1
master-bin.000001 # Table_map 1 # table_id: # (mysql.proc)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # create database mysqltest1
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t1 (a varchar(100))
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work")
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work")
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("for")
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday"
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work")
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work")
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("for")
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday"
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work")
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday"
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E6379 COLLATE latin1_swedish_ci
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday"
master-bin.000001 # Query 1 # use `mysqltest1`; create procedure foo()
begin
insert into t1 values("work");
insert into t1 values(concat("for",UUID()));
insert into t1 select "yesterday";
end
master-bin.000001 3953 Query 1 4310 use `mysqltest1`; create procedure foo2()
master-bin.000001 # Query 1 # use `mysqltest1`; create procedure foo2()
begin
insert into t1 values(concat("emergency",UUID()));
insert into t1 values("work");
......@@ -207,18 +205,18 @@ set session binlog_format=row; # accepted for stored procs
insert into t1 values("more work");
set session binlog_format=mixed;
end
master-bin.000001 4310 Query 1 4538 use `mysqltest1`; create function foo3() returns bigint unsigned
master-bin.000001 # Query 1 # use `mysqltest1`; create function foo3() returns bigint unsigned
begin
set session binlog_format=row; # rejected for stored funcs
insert into t1 values("alarm");
return 100;
end
master-bin.000001 4538 Query 1 4644 use `mysqltest1`; insert into t1 values("work")
master-bin.000001 4644 Write_rows 1 4714 table_id: 17 flags: STMT_END_F
master-bin.000001 4714 Query 1 4824 use `mysqltest1`; insert into t1 select "yesterday"
master-bin.000001 4824 Write_rows 1 4900 table_id: 17 flags: STMT_END_F
master-bin.000001 4900 Query 1 5006 use `mysqltest1`; insert into t1 values("work")
master-bin.000001 5006 Write_rows 1 5076 table_id: 17 flags: STMT_END_F
master-bin.000001 5076 Table_map 1 5121 table_id: 17 (mysqltest1.t1)
master-bin.000001 5121 Write_rows 1 5161 table_id: 17 flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work")
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday"
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work")
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
drop database mysqltest1;
......@@ -42,3 +42,4 @@ rpl_sp : Bug#16456
rpl_until : Unstable test case, bug#15886
sp-goto : GOTO is currently is disabled - will be fixed in the future
rpl_ndb_multi_update2 : BUG#17738 In progress
rpl_rbr_to_sbr : BUG#18108
......@@ -147,6 +147,8 @@ select * from t1 where a="alarm";
# and now compare:
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
show binlog events from 102;
sync_slave_with_master;
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
......
......@@ -3142,6 +3142,7 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat)
- It is not a temporary table
- The binary log is open
- The database the table resides in shall be binlogged (binlog_*_db rules)
- table is not mysql.event
*/
#ifdef HAVE_ROW_BASED_REPLICATION
......@@ -3156,7 +3157,9 @@ namespace {
thd && (thd->options & OPTION_BIN_LOG) &&
(table->s->tmp_table == NO_TMP_TABLE) &&
mysql_bin_log.is_open() &&
binlog_filter->db_ok(table->s->db.str);
binlog_filter->db_ok(table->s->db.str) &&
(strcmp(table->s->db.str, "mysql") ||
strcmp(table->s->table_name.str, "event"));
}
}
......
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