Skip to content

Commit

Permalink
Optimize Rows_query_log_event logging to save disk space
Browse files Browse the repository at this point in the history
Summary:
A separate event for trx metadata was causing an unreasonable increase in binlog
size. Also, now we're not writing rows query event if there are no comments in
the query and `log_only_query_comments` is enabled

Reviewed By: anirbanr-fb

Differential Revision: D7002217

fbshipit-source-id: 1c3ab92
  • Loading branch information
abhinav04sharma authored and facebook-github-bot committed Feb 27, 2018
1 parent 9df52ea commit bd25e29
Show file tree
Hide file tree
Showing 19 changed files with 430 additions and 253 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ stmt
### @1=2
drop table raw_binlog_rows;
SET @@SESSION.BINLOG_ROWS_QUERY_LOG_EVENTS = 1;
SET @@GLOBAL.LOG_ONLY_QUERY_COMMENTS = 0;
CREATE TABLE t1 (a VARCHAR(50));
INSERT INTO t1 VALUES ("
GRANT ALL ON *.* TO 'batman'/*!*/;
")|
DROP TABLE t1;
SET @@GLOBAL.LOG_ONLY_QUERY_COMMENTS = DEFAULT;
2 changes: 2 additions & 0 deletions mysql-test/suite/binlog/r/binlog_row_query_log_events.result
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
SET @@SESSION.BINLOG_ROWS_QUERY_LOG_EVENTS = 1;
SET @@GLOBAL.LOG_ONLY_QUERY_COMMENTS = 0;
CREATE TABLE t1 (a VARCHAR(256));
INSERT INTO t1 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
include/assert.inc [Logged query must match the one issued.]
DROP TABLE t1;
SET @@GLOBAL.LOG_ONLY_QUERY_COMMENTS = DEFAULT;
2 changes: 2 additions & 0 deletions mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_verbose.test
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ drop table raw_binlog_rows;
# the multi-line original statement are properly escaped to prevent from
# being executed.
SET @@SESSION.BINLOG_ROWS_QUERY_LOG_EVENTS = 1;
SET @@GLOBAL.LOG_ONLY_QUERY_COMMENTS = 0;
CREATE TABLE t1 (a VARCHAR(50));
--let $binlog_start_position= query_get_value("SHOW MASTER STATUS", Position, 1)

Expand Down Expand Up @@ -140,4 +141,5 @@ END_OF_FILE

# Clean up
DROP TABLE t1;
SET @@GLOBAL.LOG_ONLY_QUERY_COMMENTS = DEFAULT;
--remove_file $TMP_FILE
2 changes: 2 additions & 0 deletions mysql-test/suite/binlog/t/binlog_row_query_log_events.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Check that queries with more than 255 characters are not truncated
# when stored on Rows_query_log_events.
SET @@SESSION.BINLOG_ROWS_QUERY_LOG_EVENTS = 1;
SET @@GLOBAL.LOG_ONLY_QUERY_COMMENTS = 0;
CREATE TABLE t1 (a VARCHAR(256));

--let $as= `SELECT REPEAT('a', 256)`
Expand All @@ -29,3 +30,4 @@ if (!`SELECT COUNT(*) = 0 OR VARIABLE_VALUE != 'ON' FROM INFORMATION_SCHEMA.GLOB

# Clean up
DROP TABLE t1;
SET @@GLOBAL.LOG_ONLY_QUERY_COMMENTS = DEFAULT;
62 changes: 62 additions & 0 deletions mysql-test/suite/rpl/include/binlog_trx_meta_data.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Init
connection master;
flush logs;
let $master_last_log = query_get_value("SHOW MASTER STATUS", "File", 1);
eval purge binary logs to '$master_last_log';
connection slave;
flush logs;
let $slave_last_log = query_get_value("SHOW MASTER STATUS", "File", 1);
eval purge binary logs to '$slave_last_log';

# Generate load
connection master;
disable_result_log;
disable_query_log;
create table t1(a int auto_increment primary key) engine=innodb;
# the following loop will generate 300 meta data events, 1 for each statement
# the total number of meta data events will be 301, +1 for create stmt above
let $iter= 10;
while ($iter > 0)
{
begin;
eval /*insert*/insert into t1 values();
eval /*update*/update t1 set a= a + 1;
/*delete*/delete from t1;
commit;
dec $iter;
}
enable_result_log;
enable_query_log;
sync_slave_with_master;

# Check binlogs for meta data
connection master;
disable_query_log;
let $MYSQLD_DATADIR = `select @@datadir`;
let $MYSQLD_SECURE_FILE_DIR = `select @@secure_file_priv`;
exec $MYSQL_BINLOG -v -v $MYSQLD_DATADIR/master-bin.0* | grep "::TRX_META_DATA::" | sed 's/\"[0-9]*\"/ts/g' > $MYSQLD_SECURE_FILE_DIR/meta_data.dat;
set sql_log_bin=0;
create table test.meta_data(meta text);
eval load data infile '$MYSQLD_SECURE_FILE_DIR/meta_data.dat' into table test.meta_data;
select meta, count(*) from test.meta_data group by meta;
drop table test.meta_data;
set sql_log_bin=1;
remove_file $MYSQLD_SECURE_FILE_DIR/meta_data.dat;

connection slave;
let $MYSQLD_DATADIR = `select @@datadir`;
let $MYSQLD_SECURE_FILE_DIR = `select @@secure_file_priv`;
exec $MYSQL_BINLOG -v -v $MYSQLD_DATADIR/slave-bin.0* | grep "::TRX_META_DATA::" | sed 's/\"[0-9]*\"/ts/g' > $MYSQLD_SECURE_FILE_DIR/meta_data.dat;
set sql_log_bin=0;
create table test.meta_data(meta text);
eval load data infile '$MYSQLD_SECURE_FILE_DIR/meta_data.dat' into table test.meta_data;
select meta, count(*) from test.meta_data group by meta;
drop table test.meta_data;
set sql_log_bin=1;
remove_file $MYSQLD_SECURE_FILE_DIR/meta_data.dat;
enable_query_log;

# Cleanup
connection master;
drop table t1;
sync_slave_with_master;
64 changes: 32 additions & 32 deletions mysql-test/suite/rpl/r/binlog_db_metadata.result
Original file line number Diff line number Diff line change
Expand Up @@ -34,39 +34,39 @@ use test4;
create table t1 (a int primary key, b char(8));
insert into t1 values(1, 'a');
insert into t1 values(2, 'b');
# /*::TRX_META_DATA::{"timestamps":[ts]}*/
# /*::TRX_META_DATA::{"timestamps":[ts]}*/
# /*::TRX_META_DATA::{"timestamps":[ts]}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"test2_shard","replicaset":"test2_replicaset"}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"test2_shard","replicaset":"test2_replicaset"}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"test2_shard","replicaset":"test2_replicaset"}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"test3_shard","replicaset":"test3_replicaset"}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"test3_shard","replicaset":"test3_replicaset"}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"test3_shard","replicaset":"test3_replicaset"}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated"}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated"}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated"}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated"}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"newly_added_shard_for_test4","replicaset":"new_replicaset_for_test4"}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"newly_added_shard_for_test4","replicaset":"new_replicaset_for_test4"}*/
# /*::TRX_META_DATA::{"timestamps":[ts],"shard":"newly_added_shard_for_test4","replicaset":"new_replicaset_for_test4"}*/
# /*::TRX_META_DATA::{"ts":[ts]}*/
# /*::TRX_META_DATA::{"ts":[ts]}*/
# /*::TRX_META_DATA::{"ts":[ts]}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"test2_shard","replicaset":"test2_replicaset"}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"test2_shard","replicaset":"test2_replicaset"}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"test2_shard","replicaset":"test2_replicaset"}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"test3_shard","replicaset":"test3_replicaset"}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"test3_shard","replicaset":"test3_replicaset"}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"test3_shard","replicaset":"test3_replicaset"}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated"}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated"}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated"}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated"}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"newly_added_shard_for_test4","replicaset":"new_replicaset_for_test4"}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"newly_added_shard_for_test4","replicaset":"new_replicaset_for_test4"}*/
# /*::TRX_META_DATA::{"ts":[ts],"shard":"newly_added_shard_for_test4","replicaset":"new_replicaset_for_test4"}*/
include/sync_slave_sql_with_master.inc
# /*::TRX_META_DATA::{"timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test2_shard","replicaset":"test2_replicaset","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test2_shard","replicaset":"test2_replicaset","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test2_shard","replicaset":"test2_replicaset","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard","replicaset":"test3_replicaset","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard","replicaset":"test3_replicaset","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard","replicaset":"test3_replicaset","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"newly_added_shard_for_test4","replicaset":"new_replicaset_for_test4","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"newly_added_shard_for_test4","replicaset":"new_replicaset_for_test4","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"newly_added_shard_for_test4","replicaset":"new_replicaset_for_test4","timestamps":[ts,ts]}*/
# /*::TRX_META_DATA::{"ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test2_shard","replicaset":"test2_replicaset","ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test2_shard","replicaset":"test2_replicaset","ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test2_shard","replicaset":"test2_replicaset","ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard","replicaset":"test3_replicaset","ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard","replicaset":"test3_replicaset","ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard","replicaset":"test3_replicaset","ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated","ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated","ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated","ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"test3_shard_updated","replicaset":"test3_replicaset_updated","ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"newly_added_shard_for_test4","replicaset":"new_replicaset_for_test4","ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"newly_added_shard_for_test4","replicaset":"new_replicaset_for_test4","ts":[ts,ts]}*/
# /*::TRX_META_DATA::{"shard":"newly_added_shard_for_test4","replicaset":"new_replicaset_for_test4","ts":[ts,ts]}*/
use test;
drop table if exists t1;
drop database if exists test2;
Expand Down
14 changes: 8 additions & 6 deletions mysql-test/suite/rpl/r/binlog_trx_meta_data.result
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
set @save.binlog_trx_meta_data= @@global.binlog_trx_meta_data;
set @@global.binlog_trx_meta_data= true;
set @save.binlog_trx_meta_data= @@global.binlog_trx_meta_data;
set @@global.binlog_trx_meta_data= true;
flush logs;
purge binary logs to 'master-bin.000002';
flush logs;
purge binary logs to 'slave-bin.000002';
meta count(*)
# /*::TRX_META_DATA::{"timestamps":[ts]}*/ 301
# /*::TRX_META_DATA::{"ts":[ts]}*/ 31
meta count(*)
# /*::TRX_META_DATA::{"timestamps":[ts,ts]}*/ 301
# /*::TRX_META_DATA::{"ts":[ts,ts]}*/ 31
drop table t1;
set @@global.binlog_trx_meta_data= @save.binlog_trx_meta_data;
set @@global.binlog_trx_meta_data= @save.binlog_trx_meta_data;
set @@global.binlog_trx_meta_data= default;
set @@global.binlog_trx_meta_data= default;
include/rpl_end.inc
69 changes: 69 additions & 0 deletions mysql-test/suite/rpl/r/binlog_trx_meta_data_rbr.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
include/master-slave.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
set @@global.binlog_trx_meta_data= true;
set @@global.binlog_trx_meta_data= true;
set @@session.binlog_rows_query_log_events= OFF;
set @@global.binlog_rows_query_log_events= OFF;
include/stop_slave.inc
include/start_slave.inc
flush logs;
purge binary logs to 'master-bin.000002';
flush logs;
purge binary logs to 'slave-bin.000002';
meta count(*)
# /*::TRX_META_DATA::{"ts":[ts]}*/ 31
meta count(*)
# /*::TRX_META_DATA::{"ts":[ts,ts]}*/ 31
drop table t1;
set @@session.binlog_rows_query_log_events= ON;
set @@global.log_only_query_comments= OFF;
set @@global.binlog_rows_query_log_events= ON;
set @@global.log_only_query_comments= OFF;
include/stop_slave.inc
include/start_slave.inc
flush logs;
purge binary logs to 'master-bin.000003';
flush logs;
purge binary logs to 'slave-bin.000003';
meta count(*)
# /*::TRX_META_DATA::{"ts":[ts]}*/ 1
# /*::TRX_META_DATA::{"ts":[ts]}*//*delete*/delete from t1 10
# /*::TRX_META_DATA::{"ts":[ts]}*//*insert*/insert into t1 values() 10
# /*::TRX_META_DATA::{"ts":[ts]}*//*update*/update t1 set a= a + 1 10
meta count(*)
# /*::TRX_META_DATA::{"ts":[ts,ts]}*/ 1
# /*::TRX_META_DATA::{"ts":[ts,ts]}*//*delete*/delete from t1 10
# /*::TRX_META_DATA::{"ts":[ts,ts]}*//*insert*/insert into t1 values() 10
# /*::TRX_META_DATA::{"ts":[ts,ts]}*//*update*/update t1 set a= a + 1 10
drop table t1;
set @@session.binlog_rows_query_log_events= ON;
set @@global.log_only_query_comments= ON;
set @@global.binlog_rows_query_log_events= ON;
set @@global.log_only_query_comments= ON;
include/stop_slave.inc
include/start_slave.inc
flush logs;
purge binary logs to 'master-bin.000004';
flush logs;
purge binary logs to 'slave-bin.000004';
meta count(*)
# /*::TRX_META_DATA::{"ts":[ts]}*/ 1
# /*::TRX_META_DATA::{"ts":[ts]}*//*delete*/ 10
# /*::TRX_META_DATA::{"ts":[ts]}*//*insert*/ 10
# /*::TRX_META_DATA::{"ts":[ts]}*//*update*/ 10
meta count(*)
# /*::TRX_META_DATA::{"ts":[ts,ts]}*/ 1
# /*::TRX_META_DATA::{"ts":[ts,ts]}*//*delete*/ 10
# /*::TRX_META_DATA::{"ts":[ts,ts]}*//*insert*/ 10
# /*::TRX_META_DATA::{"ts":[ts,ts]}*//*update*/ 10
drop table t1;
set @@global.binlog_trx_meta_data= default;
set @@session.binlog_rows_query_log_events= default;
set @@global.log_only_query_comments= default;
set @@global.binlog_trx_meta_data= default;
set @@global.binlog_rows_query_log_events= default;
set @@global.log_only_query_comments= default;
include/rpl_end.inc
14 changes: 4 additions & 10 deletions mysql-test/suite/rpl/r/rpl_log_only_query_comments.result
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,14 @@ insert into t1 values(1);
/*Comment test */ insert into t1 values(2);
/*Comment test */ /* Comment test*/ insert into t1 values(4);
drop table t1;
#010909 4:46:40 server id 1 end_log_pos 325 Rows_query
# insert into t1 values(1)
--
#010909 4:46:40 server id 1 end_log_pos 578 Rows_query
#010909 4:46:40 server id 1 end_log_pos 534 Rows_query
# /*Comment test */
--
#010909 4:46:40 server id 1 end_log_pos 851 Rows_query
#010909 4:46:40 server id 1 end_log_pos 807 Rows_query
# /*Comment test */ /* Comment test*/
#010909 4:46:40 server id 1 end_log_pos 316 Rows_query
# insert into t1 values(1)
--
#010909 4:46:40 server id 1 end_log_pos 551 Rows_query
#010909 4:46:40 server id 1 end_log_pos 507 Rows_query
# /*Comment test */
--
#010909 4:46:40 server id 1 end_log_pos 806 Rows_query
#010909 4:46:40 server id 1 end_log_pos 762 Rows_query
# /*Comment test */ /* Comment test*/
include/rpl_end.inc
59 changes: 4 additions & 55 deletions mysql-test/suite/rpl/t/binlog_trx_meta_data.test
Original file line number Diff line number Diff line change
@@ -1,69 +1,18 @@
source include/master-slave.inc;
source include/not_binlog_format_row.inc; # we have binlog_trx_meta_data_rbr.test for this

# Enable trx meta data
connection master;
set @save.binlog_trx_meta_data= @@global.binlog_trx_meta_data;
set @@global.binlog_trx_meta_data= true;

connection slave;
set @save.binlog_trx_meta_data= @@global.binlog_trx_meta_data;
set @@global.binlog_trx_meta_data= true;

# Generate load
connection master;
disable_result_log;
disable_query_log;
create table t1(a int) engine=innodb;
# the following loop will generate 300 meta data events, 1 for each statement
# the total number of meta data events will be 301, +1 for create stmt above
let $iter= 100;
while ($iter > 0)
{
begin;
eval insert into t1 values($iter);
eval update t1 set a= $iter + 1;
delete from t1;
commit;
dec $iter;
}
enable_result_log;
enable_query_log;
sync_slave_with_master;

# Check binlogs for meta data
connection master;
disable_query_log;
let $MYSQLD_DATADIR = `select @@datadir`;
let $MYSQLD_SECURE_FILE_DIR = `select @@secure_file_priv`;
exec $MYSQL_BINLOG -v -v $MYSQLD_DATADIR/master-bin.0* | grep "::TRX_META_DATA::" | sed 's/\"[0-9]*\"/ts/g' > $MYSQLD_SECURE_FILE_DIR/meta_data.dat;
set sql_log_bin=0;
create table test.meta_data(meta text);
eval load data infile '$MYSQLD_SECURE_FILE_DIR/meta_data.dat' into table test.meta_data;
select meta, count(*) from test.meta_data;
drop table test.meta_data;
set sql_log_bin=1;
remove_file $MYSQLD_SECURE_FILE_DIR/meta_data.dat;

connection slave;
let $MYSQLD_DATADIR = `select @@datadir`;
let $MYSQLD_SECURE_FILE_DIR = `select @@secure_file_priv`;
exec $MYSQL_BINLOG -v -v $MYSQLD_DATADIR/slave-bin.0* | grep "::TRX_META_DATA::" | sed 's/\"[0-9]*\"/ts/g' > $MYSQLD_SECURE_FILE_DIR/meta_data.dat;
set sql_log_bin=0;
create table test.meta_data(meta text);
eval load data infile '$MYSQLD_SECURE_FILE_DIR/meta_data.dat' into table test.meta_data;
select meta, count(*) from test.meta_data;
drop table test.meta_data;
set sql_log_bin=1;
remove_file $MYSQLD_SECURE_FILE_DIR/meta_data.dat;
enable_query_log;
source suite/rpl/include/binlog_trx_meta_data.inc;

# Cleanup
connection master;
drop table t1;
sync_slave_with_master;
set @@global.binlog_trx_meta_data= default;
connection slave;
set @@global.binlog_trx_meta_data= @save.binlog_trx_meta_data;
connection master;
set @@global.binlog_trx_meta_data= @save.binlog_trx_meta_data;
set @@global.binlog_trx_meta_data= default;

source include/rpl_end.inc;
Loading

0 comments on commit bd25e29

Please sign in to comment.