Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
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]
[connection master]
connection master;
drop table if exists t1;
drop table if exists t1;
connection master;
select @@binlog_format;
select @@binlog_format;
@@binlog_format
@@binlog_format
STATEMENT
STATEMENT
...
@@ -24,11 +26,13 @@ ERROR HY000: Can't execute updates on master with binlog_format != ROW.
...
@@ -24,11 +26,13 @@ ERROR HY000: Can't execute updates on master with binlog_format != ROW.
set binlog_format=row;
set binlog_format=row;
insert into t1 values (1),(2),(3);
insert into t1 values (1),(2),(3);
include/sync_slave_sql_with_master.inc
include/sync_slave_sql_with_master.inc
connection slave;
select * from t1;
select * from t1;
pk
pk
1
1
2
2
3
3
connection master;
drop table t1;
drop table t1;
create table t1 (id int primary key, value int, value2 int, index(value)) engine=rocksdb;
create table t1 (id int primary key, value int, value2 int, index(value)) engine=rocksdb;
insert into t1 values (1,1,1);
insert into t1 values (1,1,1);
...
@@ -40,6 +44,7 @@ update t1 set value2=100 where id=1;
...
@@ -40,6 +44,7 @@ update t1 set value2=100 where id=1;
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
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]
[connection master]
connection master;
drop table if exists t1;
drop table if exists t1;
connection master;
create table t0 (a int) engine=myisam;
create table t0 (a int) engine=myisam;
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(a int) engine=myisam;
create table t1(a int) engine=myisam;
...
@@ -19,26 +21,34 @@ insert into t2 select a,a,a,a from t1;
...
@@ -19,26 +21,34 @@ insert into t2 select a,a,a,a from t1;
create table t3 like t2;
create table t3 like t2;
insert into t3 select * from t2;
insert into t3 select * from t2;
include/sync_slave_sql_with_master.inc
include/sync_slave_sql_with_master.inc
connection slave;
set global debug= 'd,dbug.rocksdb.get_row_by_rowid';
set global debug= 'd,dbug.rocksdb.get_row_by_rowid';
include/stop_slave.inc
include/stop_slave.inc
include/start_slave.inc
include/start_slave.inc
connection master;
update t2 set col1=100 where kp1 between 1 and 3 and mod(kp2,2)=0;
update t2 set col1=100 where kp1 between 1 and 3 and mod(kp2,2)=0;
connection slave;
set debug_sync= 'now WAIT_FOR Reached';
set debug_sync= 'now WAIT_FOR Reached';
set global debug = '';
set global debug = '';
set sql_log_bin=0;
set sql_log_bin=0;
delete from t2 where pk=2;
delete from t2 where pk=2;
delete from t2 where pk=3;
delete from t2 where pk=3;
set debug_sync= 'now SIGNAL signal.rocksdb.get_row_by_rowid_let_running';
set debug_sync= 'now SIGNAL signal.rocksdb.get_row_by_rowid_let_running';
connection master;
include/sync_slave_sql_with_master.inc
include/sync_slave_sql_with_master.inc
connection slave;
select * from t2 where pk < 5;
select * from t2 where pk < 5;
pk kp1 kp2 col1
pk kp1 kp2 col1
0 0 0 0
0 0 0 0
1 1 1 1
1 1 1 1
4 4 4 4
4 4 4 4
connection slave;
set global debug= 'd,dbug.rocksdb.get_row_by_rowid';
set global debug= 'd,dbug.rocksdb.get_row_by_rowid';
include/stop_slave.inc
include/stop_slave.inc
include/start_slave.inc
include/start_slave.inc
connection master;
update t3 set col1=100 where kp1 between 1 and 4 and mod(kp2,2)=0;
update t3 set col1=100 where kp1 between 1 and 4 and mod(kp2,2)=0;
connection slave;
call mtr.add_suppression("Deadlock found when trying to get lock");
call mtr.add_suppression("Deadlock found when trying to get lock");
set debug_sync= 'now WAIT_FOR Reached';
set debug_sync= 'now WAIT_FOR Reached';
set global debug = '';
set global debug = '';
...
@@ -46,7 +56,9 @@ set sql_log_bin=0;
...
@@ -46,7 +56,9 @@ set sql_log_bin=0;
delete from t3 where pk=2;
delete from t3 where pk=2;
delete from t3 where pk=3;
delete from t3 where pk=3;
set debug_sync= 'now SIGNAL signal.rocksdb.get_row_by_rowid_let_running';
set debug_sync= 'now SIGNAL signal.rocksdb.get_row_by_rowid_let_running';
CREATE TABLE t2 (v VARCHAR(65532), PRIMARY KEY (v(255))) ENGINE=rocksdb;
CREATE TABLE t2 (v VARCHAR(65532), PRIMARY KEY (v(255))) ENGINE=rocksdb;
SHOW COLUMNS IN t2;
SHOW COLUMNS IN t2;
Field Type Null Key Default Extra
Field Type Null Key Default Extra
v varchar(65532) NO PRI
v varchar(65532) NO PRI NULL
INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','','','');
INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','','','');
INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','y','Once there, double check that an article doesn\'t already exist','Here is a list of recommended books on MariaDB and MySQL. We\'ve provided links to Amazon.com here for convenience, but they can be found at many other bookstores, both online and off.
INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','y','Once there, double check that an article doesn\'t already exist','Here is a list of recommended books on MariaDB and MySQL. We\'ve provided links to Amazon.com here for convenience, but they can be found at many other bookstores, both online and off.
...
@@ -133,7 +133,7 @@ SHOW COLUMNS IN t1;
...
@@ -133,7 +133,7 @@ SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
Field Type Null Key Default Extra
v0 varchar(0) YES NULL
v0 varchar(0) YES NULL
v1 varchar(1) YES NULL
v1 varchar(1) YES NULL
v64 varchar(64) NO PRI
v64 varchar(64) NO PRI NULL
v65000 varchar(65000) YES NULL
v65000 varchar(65000) YES NULL
v65536 mediumtext YES NULL
v65536 mediumtext YES NULL
DROP TABLE t1, t2;
DROP TABLE t1, t2;
...
@@ -418,7 +418,7 @@ insert into t1 values (3, 'a \t', 'a-tab');
...
@@ -418,7 +418,7 @@ insert into t1 values (3, 'a \t', 'a-tab');
explain
explain
select col1, hex(col1) from t1;
select col1, hex(col1) from t1;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra