Skip to content

Commit 2422483

Browse files
committed
MariaRocks port: make rocksdb.rpl_statement_not_found work
1 parent 0d3d2a5 commit 2422483

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

storage/rocksdb/mysql-test/rocksdb/r/rpl_statement_not_found.result

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
include/master-slave.inc
2-
Warnings:
3-
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4-
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.
52
[connection master]
63
connection master;
74
drop table if exists t1;
@@ -17,19 +14,22 @@ kp2 int,
1714
col1 int,
1815
key (kp1,kp2)
1916
) engine=rocksdb;
17+
set @tmp_binlog_format=@@binlog_format;
18+
set @@binlog_format=ROW;
2019
insert into t2 select a,a,a,a from t1;
2120
create table t3 like t2;
2221
insert into t3 select * from t2;
22+
set binlog_format=@tmp_binlog_format;
2323
include/sync_slave_sql_with_master.inc
2424
connection slave;
25-
set global debug= 'd,dbug.rocksdb.get_row_by_rowid';
25+
set global debug_dbug= 'd,dbug.rocksdb.get_row_by_rowid';
2626
include/stop_slave.inc
2727
include/start_slave.inc
2828
connection master;
2929
update t2 set col1=100 where kp1 between 1 and 3 and mod(kp2,2)=0;
3030
connection slave;
3131
set debug_sync= 'now WAIT_FOR Reached';
32-
set global debug = '';
32+
set global debug_dbug = '';
3333
set sql_log_bin=0;
3434
delete from t2 where pk=2;
3535
delete from t2 where pk=3;
@@ -43,15 +43,15 @@ pk kp1 kp2 col1
4343
1 1 1 1
4444
4 4 4 4
4545
connection slave;
46-
set global debug= 'd,dbug.rocksdb.get_row_by_rowid';
46+
set global debug_dbug= 'd,dbug.rocksdb.get_row_by_rowid';
4747
include/stop_slave.inc
4848
include/start_slave.inc
4949
connection master;
5050
update t3 set col1=100 where kp1 between 1 and 4 and mod(kp2,2)=0;
5151
connection slave;
5252
call mtr.add_suppression("Deadlock found when trying to get lock");
5353
set debug_sync= 'now WAIT_FOR Reached';
54-
set global debug = '';
54+
set global debug_dbug = '';
5555
set sql_log_bin=0;
5656
delete from t3 where pk=2;
5757
delete from t3 where pk=3;
@@ -64,5 +64,7 @@ pk kp1 kp2 col1
6464
0 0 0 0
6565
1 1 1 1
6666
4 4 4 100
67+
set debug_sync='RESET';
68+
connection master;
6769
drop table t0, t1, t2, t3;
6870
include/rpl_end.inc

storage/rocksdb/mysql-test/rocksdb/t/rpl_row_not_found.inc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@ create table t2 (
2121
col1 int,
2222
key (kp1,kp2)
2323
) engine=rocksdb;
24+
# Use RBR for next few statements to avoid the
25+
# 'Unsafe statement written to the binary log' warnings.
26+
set @tmp_binlog_format=@@binlog_format;
27+
set @@binlog_format=ROW;
2428
insert into t2 select a,a,a,a from t1;
2529
create table t3 like t2;
2630
insert into t3 select * from t2;
31+
set binlog_format=@tmp_binlog_format;
2732

2833

2934
# For GitHub issue#166
@@ -41,7 +46,7 @@ insert into t3 select * from t2;
4146

4247
connection slave;
4348
let $old_debug = `select @@global.debug`;
44-
set global debug= 'd,dbug.rocksdb.get_row_by_rowid';
49+
set global debug_dbug= 'd,dbug.rocksdb.get_row_by_rowid';
4550
--source include/stop_slave.inc
4651
--source include/start_slave.inc
4752

@@ -50,7 +55,7 @@ update t2 set col1=100 where kp1 between 1 and 3 and mod(kp2,2)=0;
5055

5156
connection slave;
5257
set debug_sync= 'now WAIT_FOR Reached';
53-
eval set global debug = '$old_debug';
58+
eval set global debug_dbug = '$old_debug';
5459
set sql_log_bin=0;
5560
delete from t2 where pk=2;
5661
delete from t2 where pk=3;
@@ -63,7 +68,7 @@ select * from t2 where pk < 5;
6368

6469
# For GitHub issue#162 (result file must be updated after fixing #162)
6570
connection slave;
66-
set global debug= 'd,dbug.rocksdb.get_row_by_rowid';
71+
set global debug_dbug= 'd,dbug.rocksdb.get_row_by_rowid';
6772
--source include/stop_slave.inc
6873
--source include/start_slave.inc
6974

@@ -73,7 +78,7 @@ update t3 set col1=100 where kp1 between 1 and 4 and mod(kp2,2)=0;
7378
connection slave;
7479
call mtr.add_suppression("Deadlock found when trying to get lock");
7580
set debug_sync= 'now WAIT_FOR Reached';
76-
eval set global debug = '$old_debug';
81+
eval set global debug_dbug = '$old_debug';
7782
set sql_log_bin=0;
7883
delete from t3 where pk=2;
7984
delete from t3 where pk=3;
@@ -85,6 +90,7 @@ connection slave;
8590
# col1 for pk=4 should be 100
8691
select * from t3 where pk < 5;
8792

93+
set debug_sync='RESET';
8894
# Cleanup
8995
connection master;
9096
drop table t0, t1, t2, t3;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
--source include/have_binlog_format_statement.inc
12
--source rpl_row_not_found.inc
23

0 commit comments

Comments
 (0)