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 SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
set @save_rocksdb_blind_delete_primary_key=@@session.rocksdb_blind_delete_primary_key;
set @save_rocksdb_master_skip_tx_api=@@session.rocksdb_master_skip_tx_api;
DROP TABLE IF EXISTS t1,t2;
create table t1 (id int primary key, value int, value2 varchar(200)) engine=rocksdb;
create table t2 (id int primary key, value int, value2 varchar(200), index(value)) engine=rocksdb;
SET session rocksdb_blind_delete_primary_key=1;
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_rows_deleted_blind';
select variable_value-@c from information_schema.global_status where variable_name='rocksdb_rows_deleted_blind';
variable_value-@c
1000
SELECT count(*) FROM t1;
count(*)
9000
include/sync_slave_sql_with_master.inc
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SELECT count(*) FROM t1;
count(*)
9000
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_rows_deleted_blind';
select variable_value-@c from information_schema.global_status where variable_name='rocksdb_rows_deleted_blind';
variable_value-@c
0
SELECT count(*) FROM t2;
count(*)
9000
SET session rocksdb_master_skip_tx_api=1;
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_rows_deleted_blind';
select variable_value-@c from information_schema.global_status where variable_name='rocksdb_rows_deleted_blind';
variable_value-@c
1000
SELECT count(*) FROM t1;
count(*)
8000
SELECT count(*) FROM t2;
count(*)
8000
include/sync_slave_sql_with_master.inc
SELECT count(*) FROM t1;
count(*)
8000
SELECT count(*) FROM t2;
count(*)
8000
select variable_value into @c from information_schema.global_status where variable_name='rocksdb_rows_deleted_blind';
DELETE FROM t1 WHERE id BETWEEN 3001 AND 4000;
DELETE FROM t2 WHERE id BETWEEN 3001 AND 4000;
select variable_value-@c from information_schema.global_status where variable_name='rocksdb_rows_deleted_blind';
variable_value-@c
0
SELECT count(*) FROM t1;
count(*)
7000
SELECT count(*) FROM t2;
count(*)
7000
include/sync_slave_sql_with_master.inc
SELECT count(*) FROM t1;
count(*)
7000
SELECT count(*) FROM t2;
count(*)
7000
DELETE FROM t1 WHERE id = 10;
SELECT count(*) FROM t1;
count(*)
7000
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.*Error_code.*");
call mtr.add_suppression("Slave: Can't find record in 't1'.*");
include/wait_for_slave_sql_error.inc [errno=1032]
set @save_rocksdb_read_free_rpl=@@global.rocksdb_read_free_rpl;
set global rocksdb_read_free_rpl=PK_SK;
START SLAVE;
include/sync_slave_sql_with_master.inc
SELECT count(*) FROM t1;
count(*)
7000
set global rocksdb_read_free_rpl=@save_rocksdb_read_free_rpl;
SET session rocksdb_blind_delete_primary_key=@save_rocksdb_blind_delete_primary_key;
SET session rocksdb_master_skip_tx_api=@save_rocksdb_master_skip_tx_api;
DROP TABLE t1, t2;
include/rpl_end.inc
