mariadb/mysql-test/r/rpl_flush_tables.result
guilhem@mysql.com ed1696f6b9 WL#1062 "log charset info into all Query_log_event":
we store 7 bytes (1 + 2*3) in every Query_log_event.
In the future if users want binlog optimized for small size and less safe,
we could add --binlog-no-charset (and binlog-no-sql-mode etc): charset info
is something by design optional (even if for now we don't offer possibility to disable it):
it's not a binlog format change.
We try to reduce the number of get_charset() calls in the slave SQL thread to a minimum
by caching the charset read from the previous event (which will often be equal to the one of the current event).
We don't use SET ONE_SHOT for charset-aware repl (we still do for timezones, will be fixed later).
No more errors if one changes the global value of charset vars on master or slave
(as we log charset info in all Query_log_event).
Not fixing Load_log_event as it will be rewritten soon by Dmitri.
Testing how mysqlbinlog behaves in rpl_charset.test.
mysqlbinlog needs to know where charset file is (to be able to convert a charset number found
in binlog (e.g. in User_var_log_event) to a charset name); mysql-test-run needs to pass
the correct value for this option to mysqlbinlog.
Many result udpates (adding charset info into every event shifts log_pos in SHOW BINLOG EVENTS).
Roughly the same job is to be done for timezones :)
2005-02-03 16:22:16 +01:00

40 lines
1.8 KiB
Text

stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1 (a int);
insert into t1 values (10);
create table t2 (a int);
create table t3 (a int) engine=merge union(t1);
create table t4 (a int);
insert into t4 select * from t3;
rename table t1 to t5, t2 to t1;
flush no_write_to_binlog tables;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 95 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 95 Query 1 182 use `test`; create table t1 (a int)
master-bin.000001 182 Query 1 272 use `test`; insert into t1 values (10)
master-bin.000001 272 Query 1 359 use `test`; create table t2 (a int)
master-bin.000001 359 Query 1 469 use `test`; create table t3 (a int) engine=merge union(t1)
master-bin.000001 469 Query 1 556 use `test`; create table t4 (a int)
master-bin.000001 556 Query 1 651 use `test`; insert into t4 select * from t3
master-bin.000001 651 Query 1 746 use `test`; rename table t1 to t5, t2 to t1
select * from t3;
a
flush tables;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 95 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 95 Query 1 182 use `test`; create table t1 (a int)
master-bin.000001 182 Query 1 272 use `test`; insert into t1 values (10)
master-bin.000001 272 Query 1 359 use `test`; create table t2 (a int)
master-bin.000001 359 Query 1 469 use `test`; create table t3 (a int) engine=merge union(t1)
master-bin.000001 469 Query 1 556 use `test`; create table t4 (a int)
master-bin.000001 556 Query 1 651 use `test`; insert into t4 select * from t3
master-bin.000001 651 Query 1 746 use `test`; rename table t1 to t5, t2 to t1
master-bin.000001 746 Query 1 822 use `test`; flush tables
select * from t3;
a