mirror of
https://github.com/MariaDB/server.git
synced 2026-04-19 06:45:32 +02:00
Merge branch 'merge-tokudb-5.6' into 10.0
This commit is contained in:
commit
8b0edbfb5e
88 changed files with 123 additions and 1087 deletions
|
|
@ -18,8 +18,10 @@ update t set b=b+2 where a=1;
|
|||
update t set b=b+3 where a=4;
|
||||
update t set b=b+4 where a=3;
|
||||
update t set b=b+1 where 1<=a and a<=3;
|
||||
select unix_timestamp() into @tstart;
|
||||
select unix_timestamp() into @tend;
|
||||
# select unix_timestamp() into @tstart;
|
||||
# Commented out for MariaDB
|
||||
# select unix_timestamp() into @tend;
|
||||
# select @tend-@tstart <= 5; # assert no delay in the delete time
|
||||
select * from t;
|
||||
a b
|
||||
1 3
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ Variable_name Value
|
|||
tokudb_rpl_unique_checks OFF
|
||||
tokudb_rpl_unique_checks_delay 5000
|
||||
create table t (a bigint not null, primary key(a)) engine=tokudb;
|
||||
select unix_timestamp() into @tstart;
|
||||
insert into t values (1);
|
||||
insert into t values (2),(3);
|
||||
insert into t values (4);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
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]
|
||||
call mtr.add_suppression("read free replication is disabled for tokudb table");
|
||||
CREATE TABLE t (a int(11), b char(20)) ENGINE = TokuDB;
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
include/master-slave.inc
|
||||
[connection master]
|
||||
CREATE TABLE t1 (a INT) ENGINE=tokudb;
|
||||
begin;
|
||||
insert into t1 values(1);
|
||||
flush tables with read lock;
|
||||
commit;
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
include/rpl_end.inc
|
||||
|
|
@ -8,9 +8,6 @@
|
|||
# We also check how the foreign_key_check variable is replicated
|
||||
#
|
||||
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 @old_concurrent_insert= @@global.concurrent_insert;
|
||||
SET @@global.concurrent_insert= 0;
|
||||
|
|
@ -19,7 +16,6 @@ create table t2(b int auto_increment, c int, key(b)) engine=tokudb;
|
|||
insert into t1 values (1),(2),(3);
|
||||
insert into t1 values (null);
|
||||
insert into t2 values (null,last_insert_id());
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
|
|
@ -39,7 +35,6 @@ insert into t1 values (null),(null),(null);
|
|||
insert into t2 values (5,0);
|
||||
insert into t2 values (null,last_insert_id());
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1;
|
||||
a
|
||||
10
|
||||
|
|
@ -68,7 +63,6 @@ b c
|
|||
7 11
|
||||
8 12
|
||||
9 13
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1 ORDER BY a;
|
||||
a
|
||||
10
|
||||
|
|
@ -84,7 +78,6 @@ b c
|
|||
9 13
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
#
|
||||
# Bug#8412: Error codes reported in binary log for CHARACTER SET,
|
||||
# FOREIGN_KEY_CHECKS
|
||||
|
|
@ -94,9 +87,7 @@ CREATE TABLE t1 ( a INT UNIQUE ) engine=tokudb;
|
|||
SET FOREIGN_KEY_CHECKS=0;
|
||||
INSERT INTO t1 VALUES (1),(1);
|
||||
Got one of the listed errors
|
||||
include/sync_slave_sql_with_master.inc
|
||||
drop table t1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
#
|
||||
# Bug#14553: NULL in WHERE resets LAST_INSERT_ID
|
||||
#
|
||||
|
|
@ -109,7 +100,6 @@ insert into t2 (a) select a from t1 where a is null;
|
|||
select * from t2;
|
||||
a
|
||||
1
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t2;
|
||||
a
|
||||
1
|
||||
|
|
@ -188,7 +178,6 @@ id last_id
|
|||
1 3
|
||||
2 4
|
||||
3 5
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1;
|
||||
id last_id
|
||||
1 0
|
||||
|
|
@ -222,7 +211,6 @@ insert into t1 values(null,100);
|
|||
select * from t1 order by n;
|
||||
n b
|
||||
1 100
|
||||
include/sync_slave_sql_with_master.inc
|
||||
insert into t1 values(null,200),(null,300);
|
||||
delete from t1 where b <> 100;
|
||||
select * from t1 order by n;
|
||||
|
|
@ -233,7 +221,6 @@ select * from t1 order by n;
|
|||
n b
|
||||
2 100
|
||||
3 350
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1 order by n;
|
||||
n b
|
||||
2 100
|
||||
|
|
@ -243,15 +230,14 @@ select * from t1 order by n;
|
|||
n b
|
||||
2 100
|
||||
4 400
|
||||
5 600
|
||||
1000 350
|
||||
include/sync_slave_sql_with_master.inc
|
||||
1001 600
|
||||
select * from t1 order by n;
|
||||
n b
|
||||
2 100
|
||||
4 400
|
||||
5 600
|
||||
1000 350
|
||||
1001 600
|
||||
drop table t1;
|
||||
create table t1 (n int primary key auto_increment not null,
|
||||
b int, unique(b)) engine=tokudb;
|
||||
|
|
@ -259,7 +245,6 @@ insert into t1 values(null,100);
|
|||
select * from t1 order by n;
|
||||
n b
|
||||
1 100
|
||||
include/sync_slave_sql_with_master.inc
|
||||
insert into t1 values(null,200),(null,300);
|
||||
delete from t1 where b <> 100;
|
||||
select * from t1 order by n;
|
||||
|
|
@ -270,13 +255,11 @@ select * from t1 order by n;
|
|||
n b
|
||||
2 100
|
||||
3 350
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1 order by n;
|
||||
n b
|
||||
2 100
|
||||
3 350
|
||||
drop table t1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT,
|
||||
UNIQUE(b)) ENGINE=tokudb;
|
||||
INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10;
|
||||
|
|
@ -284,7 +267,6 @@ SELECT * FROM t1 ORDER BY a;
|
|||
a b
|
||||
1 10
|
||||
2 2
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
1 10
|
||||
|
|
@ -327,7 +309,6 @@ id field_1 field_2 field_3
|
|||
4 4 d 4d
|
||||
5 5 e 5e
|
||||
8 6 f 6f
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id field_1 field_2 field_3
|
||||
1 1 a 1a
|
||||
|
|
@ -364,7 +345,6 @@ id last_id
|
|||
SELECT * FROM t2 ORDER BY id;
|
||||
id last_id
|
||||
1 0
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
id last_id
|
||||
0 1
|
||||
|
|
@ -446,7 +426,6 @@ i
|
|||
5
|
||||
6
|
||||
16
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1;
|
||||
i j
|
||||
1 -1
|
||||
|
|
@ -478,7 +457,6 @@ DROP FUNCTION f1;
|
|||
DROP FUNCTION f2;
|
||||
DROP FUNCTION f3;
|
||||
DROP TABLE t1, t2;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
|
|
@ -513,7 +491,6 @@ select * from t2 order by id;
|
|||
id last_id
|
||||
4 0
|
||||
8 0
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1 order by id;
|
||||
id
|
||||
0
|
||||
|
|
@ -540,7 +517,6 @@ n b
|
|||
select * from t2 order by id;
|
||||
id last_id
|
||||
1 3
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1 order by n;
|
||||
n b
|
||||
1 10
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
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]
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
|
||||
create table t1(a int auto_increment, primary key(a));
|
||||
|
|
@ -9,7 +6,6 @@ create table t2(b int auto_increment, c int, primary key(b));
|
|||
insert into t1 values (1),(2),(3);
|
||||
insert into t1 values (null);
|
||||
insert into t2 values (null,last_insert_id());
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
|
|
@ -29,7 +25,6 @@ insert into t1 values (null),(null),(null);
|
|||
insert into t2 values (5,0);
|
||||
insert into t2 values (null,last_insert_id());
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1;
|
||||
a
|
||||
10
|
||||
|
|
@ -55,7 +50,6 @@ b c
|
|||
7 11
|
||||
8 12
|
||||
9 13
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1 ORDER BY a;
|
||||
a
|
||||
10
|
||||
|
|
@ -71,12 +65,10 @@ b c
|
|||
9 13
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SET TIMESTAMP=1000000000;
|
||||
CREATE TABLE t1 ( a INT UNIQUE );
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
INSERT INTO t1 VALUES (1),(1);
|
||||
Got one of the listed errors
|
||||
include/sync_slave_sql_with_master.inc
|
||||
drop table t1;
|
||||
include/rpl_end.inc
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
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]
|
||||
call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.');
|
||||
CREATE TABLE t1 (
|
||||
|
|
@ -24,6 +21,5 @@ a b
|
|||
1 0
|
||||
2 1
|
||||
UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
drop table t1, t2;
|
||||
include/rpl_end.inc
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
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]
|
||||
call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT');
|
||||
drop table if exists t1,t2;
|
||||
|
|
@ -42,19 +39,15 @@ a b
|
|||
1 0
|
||||
2 1
|
||||
drop table t1,t2;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
reset master;
|
||||
RESET MASTER;
|
||||
CREATE TABLE t1 ( a INT );
|
||||
INSERT INTO t1 VALUES (0);
|
||||
UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b;
|
||||
select * from t1;
|
||||
a
|
||||
3
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1;
|
||||
a
|
||||
3
|
||||
drop table t1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/rpl_end.inc
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
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]
|
||||
call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.');
|
||||
|
||||
|
|
@ -34,7 +31,6 @@ SELECT * FROM t2 ORDER BY a;
|
|||
a b
|
||||
1 6
|
||||
2 6
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
1 0
|
||||
|
|
@ -70,7 +66,6 @@ WHERE b2 = 'baz')
|
|||
AND a.a3 IS NULL
|
||||
AND a.a4 = 'foo'
|
||||
AND a.a5 = 'bar';
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1;
|
||||
a1 a2 a3 a4 a5
|
||||
No 1 NULL foo bar
|
||||
|
|
@ -120,7 +115,6 @@ FROM t3
|
|||
WHERE y = 34
|
||||
)
|
||||
WHERE b.x = 23;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1;
|
||||
i j x y z
|
||||
1 2 23 24 71
|
||||
|
|
@ -181,7 +175,6 @@ idpro price nbprice
|
|||
1 1.0000 3
|
||||
2 1.0000 2
|
||||
3 2.0000 1
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select "-- SLAVE AFTER JOIN --" as "";
|
||||
|
||||
-- SLAVE AFTER JOIN --
|
||||
|
|
@ -1,15 +1,13 @@
|
|||
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]
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/stop_slave.inc
|
||||
include/wait_for_slave_to_stop.inc
|
||||
reset master;
|
||||
reset slave;
|
||||
start slave;
|
||||
include/wait_for_slave_to_start.inc
|
||||
set @save_slave_ddl_exec_mode=@@global.slave_ddl_exec_mode;
|
||||
set @@global.slave_ddl_exec_mode=STRICT;
|
||||
create table t1(n int not null auto_increment primary key)ENGINE=TokuDB;
|
||||
insert into t1 values (NULL);
|
||||
drop table t1;
|
||||
|
|
@ -20,25 +18,34 @@ count(*)
|
|||
69
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
flush logs;
|
||||
create table t3 (a int)ENGINE=TokuDB;
|
||||
|
|
@ -113,7 +120,6 @@ Aberdeen
|
|||
Abernathy
|
||||
aberrant
|
||||
aberration
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1 order by 1 asc;
|
||||
word
|
||||
Aarhus
|
||||
|
|
@ -192,56 +198,67 @@ create table t2 (n int)ENGINE=TokuDB;
|
|||
insert into t2 values (1);
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Rotate # # master-bin.000002;pos=POS
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000002 # Binlog_checkpoint # # master-bin.000002
|
||||
master-bin.000002 # Gtid # # GTID #-#-#
|
||||
master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=TokuDB
|
||||
master-bin.000002 # Gtid # # GTID #-#-#
|
||||
master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=TokuDB
|
||||
master-bin.000002 # Query # # BEGIN
|
||||
master-bin.000002 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000002 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000002 # Xid # # COMMIT /* XID */
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 #
|
||||
master-bin.000002 #
|
||||
include/sync_slave_sql_with_master.inc
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
slave-bin.000001 #
|
||||
slave-bin.000002 #
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB
|
||||
slave-bin.000001 # Query # # BEGIN
|
||||
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
slave-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Xid # # COMMIT /* XID */
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB
|
||||
slave-bin.000001 # Query # # BEGIN
|
||||
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
slave-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Xid # # COMMIT /* XID */
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=TokuDB
|
||||
slave-bin.000001 # Rotate # # slave-bin.000002;pos=POS
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002
|
||||
slave-bin.000002 # Gtid # # GTID #-#-#
|
||||
slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=TokuDB
|
||||
slave-bin.000002 # Query # # BEGIN
|
||||
slave-bin.000002 # Gtid # # BEGIN GTID #-#-#
|
||||
slave-bin.000002 # Table_map # # table_id: # (test.t2)
|
||||
slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
slave-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
slave-bin.000002 # Xid # # COMMIT /* XID */
|
||||
include/check_slave_is_running.inc
|
||||
show binlog events in 'slave-bin.000005' from 4;
|
||||
|
|
@ -256,14 +273,15 @@ set insert_id=5;
|
|||
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int)
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
select * from t1;
|
||||
a b
|
||||
|
|
@ -271,5 +289,5 @@ a b
|
|||
5 1
|
||||
6 1
|
||||
drop table t1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
set @@global.slave_ddl_exec_mode=@save_slave_ddl_exec_mode;
|
||||
include/rpl_end.inc
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
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]
|
||||
DROP PROCEDURE IF EXISTS test.p1;
|
||||
DROP PROCEDURE IF EXISTS test.p2;
|
||||
|
|
@ -33,7 +30,6 @@ release_lock("test")
|
|||
SELECT * FROM test.t1;
|
||||
a
|
||||
5
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM test.t1;
|
||||
a
|
||||
5
|
||||
|
|
@ -49,12 +45,10 @@ release_lock("test")
|
|||
SELECT * FROM test.t1;
|
||||
a
|
||||
8
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM test.t1;
|
||||
a
|
||||
8
|
||||
DROP PROCEDURE IF EXISTS test.p1;
|
||||
DROP PROCEDURE IF EXISTS test.p2;
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/rpl_end.inc
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
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]
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t2;
|
||||
|
|
@ -36,12 +33,9 @@ BEGIN
|
|||
INSERT INTO t1 VALUES ('MySQL','1993-02-04'),('ROCKS', '1990-08-27'),('Texas', '1999-03-30'),('kyle','2005-1-1');
|
||||
END|
|
||||
CALL p2();
|
||||
include/sync_slave_sql_with_master.inc
|
||||
CALL p1();
|
||||
include/sync_slave_sql_with_master.inc
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP PROCEDURE p1;
|
||||
DROP PROCEDURE p2;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/rpl_end.inc
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
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]
|
||||
DROP TRIGGER test.t1_bi_t2;
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
|
|
@ -18,7 +15,6 @@ n d
|
|||
select * from test.t2;
|
||||
n f
|
||||
1 0
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from test.t1;
|
||||
n d
|
||||
1 1.234
|
||||
|
|
@ -28,5 +24,4 @@ n f
|
|||
DROP TRIGGER test.t1_bi_t2;
|
||||
DROP TABLE test.t1;
|
||||
DROP TABLE test.t2;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/rpl_end.inc
|
||||
|
|
@ -1,15 +1,13 @@
|
|||
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]
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/stop_slave.inc
|
||||
include/wait_for_slave_to_stop.inc
|
||||
reset master;
|
||||
reset slave;
|
||||
start slave;
|
||||
include/wait_for_slave_to_start.inc
|
||||
set @save_slave_ddl_exec_mode=@@global.slave_ddl_exec_mode;
|
||||
set @@global.slave_ddl_exec_mode=STRICT;
|
||||
create table t1(n int not null auto_increment primary key)ENGINE=TokuDB;
|
||||
insert into t1 values (NULL);
|
||||
drop table t1;
|
||||
|
|
@ -20,23 +18,32 @@ count(*)
|
|||
69
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Intvar # # INSERT_ID=1
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (NULL)
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=#
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Intvar # # INSERT_ID=1
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (NULL)
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
|
|
@ -113,7 +120,6 @@ Aberdeen
|
|||
Abernathy
|
||||
aberrant
|
||||
aberration
|
||||
include/sync_slave_sql_with_master.inc
|
||||
select * from t1 order by 1 asc;
|
||||
word
|
||||
Aarhus
|
||||
|
|
@ -192,53 +198,64 @@ create table t2 (n int)ENGINE=TokuDB;
|
|||
insert into t2 values (1);
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Intvar # # INSERT_ID=1
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (NULL)
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=#
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Rotate # # master-bin.000002;pos=POS
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000002 # Binlog_checkpoint # # master-bin.000002
|
||||
master-bin.000002 # Gtid # # GTID #-#-#
|
||||
master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=TokuDB
|
||||
master-bin.000002 # Gtid # # GTID #-#-#
|
||||
master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=TokuDB
|
||||
master-bin.000002 # Query # # BEGIN
|
||||
master-bin.000002 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000002 # Query # # use `test`; insert into t2 values (1)
|
||||
master-bin.000002 # Xid # # COMMIT /* XID */
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 #
|
||||
master-bin.000002 #
|
||||
include/sync_slave_sql_with_master.inc
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
slave-bin.000001 #
|
||||
slave-bin.000002 #
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB
|
||||
slave-bin.000001 # Query # # BEGIN
|
||||
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
slave-bin.000001 # Intvar # # INSERT_ID=1
|
||||
slave-bin.000001 # Query # # use `test`; insert into t1 values (NULL)
|
||||
slave-bin.000001 # Xid # # COMMIT /* XID */
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=TokuDB
|
||||
slave-bin.000001 # Query # # BEGIN
|
||||
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
slave-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||
slave-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../tmp/SQL_LOAD-<SERVER UUID>-<MASTER server-id>-<file-id>.<extension>' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=#
|
||||
slave-bin.000001 # Xid # # COMMIT /* XID */
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=TokuDB
|
||||
slave-bin.000001 # Rotate # # slave-bin.000002;pos=POS
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000002 # Binlog_checkpoint # # slave-bin.000002
|
||||
slave-bin.000002 # Gtid # # GTID #-#-#
|
||||
slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=TokuDB
|
||||
slave-bin.000002 # Query # # BEGIN
|
||||
slave-bin.000002 # Gtid # # BEGIN GTID #-#-#
|
||||
slave-bin.000002 # Query # # use `test`; insert into t2 values (1)
|
||||
slave-bin.000002 # Xid # # COMMIT /* XID */
|
||||
include/check_slave_is_running.inc
|
||||
|
|
@ -254,12 +271,13 @@ set insert_id=5;
|
|||
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t1(a int auto_increment primary key, b int)
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Intvar # # INSERT_ID=1
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (NULL, 1)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Intvar # # LAST_INSERT_ID=1
|
||||
master-bin.000001 # Intvar # # INSERT_ID=5
|
||||
master-bin.000001 # Query # # use `test`; insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id())
|
||||
|
|
@ -270,5 +288,5 @@ a b
|
|||
5 1
|
||||
6 1
|
||||
drop table t1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
set @@global.slave_ddl_exec_mode=@save_slave_ddl_exec_mode;
|
||||
include/rpl_end.inc
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
-- source include/not_ndb_default.inc
|
||||
-- source include/have_tokudb.inc
|
||||
|
||||
let $engine_type=TokuDB;
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
# 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures)
|
||||
#
|
||||
#################################################################################
|
||||
--source include/master-slave.inc
|
||||
--source include/have_tokudb.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
let $engine=TokuDB;
|
||||
--source extra/rpl_tests/rpl_not_null.test
|
||||
|
|
|
|||
|
|
@ -1,5 +1,2 @@
|
|||
--read-only=ON
|
||||
--loose-tokudb-rpl-unique-checks-delay=10000
|
||||
--loose-tokudb-rpl-unique-checks=OFF
|
||||
--loose-tokudb-rpl-lookup-rows-delay=10000
|
||||
--loose-tokudb-rpl-lookup-rows=OFF
|
||||
--read-only=ON --loose-tokudb-rpl-unique-checks-delay=10000 --loose-tokudb-rpl-unique-checks=OFF --loose-tokudb-rpl-lookup-rows-delay=10000 --loose-tokudb-rpl-lookup-rows=OFF
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1 @@
|
|||
--read-only=ON
|
||||
--loose-tokudb-rpl-unique-checks-delay=10000
|
||||
--loose-tokudb-rpl-unique-checks=OFF
|
||||
--loose-tokudb-rpl-lookup-rows-delay=10000
|
||||
--loose-tokudb-rpl-lookup-rows=OFF
|
||||
--read-only=ON --loose-tokudb-rpl-unique-checks-delay=10000 --loose-tokudb-rpl-unique-checks=OFF --loose-tokudb-rpl-lookup-rows-delay=10000 --loose-tokudb-rpl-lookup-rows=OFF
|
||||
|
|
|
|||
|
|
@ -42,15 +42,16 @@ update t set b=b+2 where a=1;
|
|||
update t set b=b+3 where a=4;
|
||||
update t set b=b+4 where a=3;
|
||||
update t set b=b+1 where 1<=a and a<=3;
|
||||
select unix_timestamp() into @tstart;
|
||||
--echo # select unix_timestamp() into @tstart;
|
||||
|
||||
# wait for the delete to finish on the slave
|
||||
connection master;
|
||||
sync_slave_with_master;
|
||||
# source include/sync_slave_sql_with_master.inc;
|
||||
connection master;
|
||||
select unix_timestamp() into @tend;
|
||||
#select @tend-@tstart <= 5; # assert no delay in the delete time
|
||||
--echo # Commented out for MariaDB
|
||||
--echo # select unix_timestamp() into @tend;
|
||||
--echo # select @tend-@tstart <= 5; # assert no delay in the delete time
|
||||
|
||||
connection slave;
|
||||
select * from t;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
--read-only=ON
|
||||
--loose-tokudb-rpl-unique-checks-delay=5000
|
||||
--loose-tokudb-rpl-unique-checks=OFF
|
||||
--read-only=ON --loose-tokudb-rpl-unique-checks-delay=5000 --loose-tokudb-rpl-unique-checks=OFF
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ connection master;
|
|||
# select @@autocommit;
|
||||
eval create table t (a bigint not null, primary key(a)) engine=$engine;
|
||||
# show create table t;
|
||||
select unix_timestamp() into @tstart;
|
||||
insert into t values (1);
|
||||
insert into t values (2),(3);
|
||||
insert into t values (4);
|
||||
|
|
@ -30,8 +29,7 @@ insert into t values (4);
|
|||
sync_slave_with_master;
|
||||
# source include/sync_slave_sql_with_master.inc;
|
||||
|
||||
#connection master;
|
||||
#select unix_timestamp()-@tstart;
|
||||
connection master;
|
||||
|
||||
connection slave;
|
||||
# insert into t values (5); # test read-only
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
-- source include/have_tokudb.inc
|
||||
-- source include/have_binlog_format_row.inc
|
||||
-- source include/master-slave.inc
|
||||
--source include/have_tokudb.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
connection slave;
|
||||
let $bit_field_special = ALL_LOSSY;
|
||||
let $type= 'TokuDB';
|
||||
let $extra_index= ;
|
||||
-- source extra/rpl_tests/rpl_row_basic.test
|
||||
let $type = 'TokuDB';
|
||||
let $extra_index = ;
|
||||
--source extra/rpl_tests/rpl_row_basic.test
|
||||
|
||||
--source include/rpl_end.inc
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
source include/master-slave.inc;
|
||||
source include/have_tokudb.inc;
|
||||
source include/have_binlog_format_statement.inc;
|
||||
# gtids disabled because it tests DROP TEMPORARY inside a transaction
|
||||
|
||||
source extra/rpl_tests/rpl_tokudb.test;
|
||||
--source include/rpl_end.inc
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
# Added comments section and to skip when ndb is #
|
||||
# Default engine. #
|
||||
#######################################################
|
||||
--source include/not_gtid_enabled.inc
|
||||
--source include/not_ndb_default.inc
|
||||
--source include/have_tokudb.inc
|
||||
--source include/master-slave.inc
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
# test tokudb read free replication feature with partition table
|
||||
|
||||
skip MDEV-13441;
|
||||
--source include/have_partition.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_tokudb.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
#
|
||||
# For details look into extra/rpl_tests/rpl_lower_case_table_names.test
|
||||
#
|
||||
skip Missing extra/rpl_tests/rpl_lower_case_table_names.test;
|
||||
|
||||
-- source include/not_gtid_enabled.inc
|
||||
-- source include/have_tokudb.inc
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
#
|
||||
# For details look into extra/rpl_tests/rpl_lower_case_table_names.test
|
||||
#
|
||||
skip Missing extra/rpl_tests/rpl_lower_case_table_names.test;
|
||||
|
||||
-- source include/not_gtid_enabled.inc
|
||||
-- source include/have_tokudb.inc
|
||||
-- source include/not_windows.inc
|
||||
-- source include/have_binlog_format_mixed_or_statement.inc
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
--echo ### connection default
|
||||
|
||||
skip MDEV-13442;
|
||||
CREATE TABLE t (a INT PRIMARY KEY, b INT) ENGINE=TokuDB;
|
||||
|
||||
INSERT INTO t (a, b) VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5),
|
||||
|
|
|
|||
|
|
@ -1,210 +0,0 @@
|
|||
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 SQL_LOG_BIN= 0;
|
||||
CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL,
|
||||
`c` INT DEFAULT NULL,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
CREATE TABLE t3(`a` INT, `b` DATE DEFAULT NULL,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
CREATE TABLE t4(`a` INT, `b` DATE DEFAULT NULL,
|
||||
`c` INT DEFAULT NULL,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
SET SQL_LOG_BIN= 1;
|
||||
CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL,
|
||||
`c` INT DEFAULT NULL,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
CREATE TABLE t3(`a` INT, `b` DATE DEFAULT '0000-00-00',
|
||||
`c` INT DEFAULT 500,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
CREATE TABLE t4(`a` INT, `b` DATE DEFAULT '0000-00-00',
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
************* EXECUTION WITH INSERTS *************
|
||||
INSERT INTO t1(a,b,c) VALUES (1, null, 1);
|
||||
INSERT INTO t1(a,b,c) VALUES (2,'1111-11-11', 2);
|
||||
INSERT INTO t1(a,b) VALUES (3, null);
|
||||
INSERT INTO t1(a,c) VALUES (4, 4);
|
||||
INSERT INTO t1(a) VALUES (5);
|
||||
INSERT INTO t2(a,b) VALUES (1, null);
|
||||
INSERT INTO t2(a,b) VALUES (2,'1111-11-11');
|
||||
INSERT INTO t2(a) VALUES (3);
|
||||
INSERT INTO t3(a,b) VALUES (1, null);
|
||||
INSERT INTO t3(a,b) VALUES (2,'1111-11-11');
|
||||
INSERT INTO t3(a) VALUES (3);
|
||||
INSERT INTO t4(a,b,c) VALUES (1, null, 1);
|
||||
INSERT INTO t4(a,b,c) VALUES (2,'1111-11-11', 2);
|
||||
INSERT INTO t4(a,b) VALUES (3, null);
|
||||
INSERT INTO t4(a,c) VALUES (4, 4);
|
||||
INSERT INTO t4(a) VALUES (5);
|
||||
************* SHOWING THE RESULT SETS WITH INSERTS *************
|
||||
include/sync_slave_sql_with_master.inc
|
||||
TABLES t1 and t2 must be equal otherwise an error will be thrown.
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
TABLES t2 and t3 must be different.
|
||||
SELECT * FROM t3 ORDER BY a;
|
||||
a b
|
||||
1 NULL
|
||||
2 1111-11-11
|
||||
3 NULL
|
||||
SELECT * FROM t3 ORDER BY a;
|
||||
a b c
|
||||
1 NULL 500
|
||||
2 1111-11-11 500
|
||||
3 NULL 500
|
||||
SELECT * FROM t4 ORDER BY a;
|
||||
a b c
|
||||
1 NULL 1
|
||||
2 1111-11-11 2
|
||||
3 NULL NULL
|
||||
4 NULL 4
|
||||
5 NULL NULL
|
||||
SELECT * FROM t4 ORDER BY a;
|
||||
a b
|
||||
1 NULL
|
||||
2 1111-11-11
|
||||
3 NULL
|
||||
4 NULL
|
||||
5 NULL
|
||||
************* EXECUTION WITH UPDATES and REPLACES *************
|
||||
DELETE FROM t1;
|
||||
INSERT INTO t1(a,b,c) VALUES (1,'1111-11-11', 1);
|
||||
REPLACE INTO t1(a,b,c) VALUES (2,'1111-11-11', 2);
|
||||
UPDATE t1 set b= NULL, c= 300 where a= 1;
|
||||
REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300);
|
||||
************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES *************
|
||||
include/sync_slave_sql_with_master.inc
|
||||
TABLES t1 and t2 must be equal otherwise an error will be thrown.
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
************* CLEANING *************
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
DROP TABLE t4;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SET SQL_LOG_BIN= 0;
|
||||
CREATE TABLE t1 (`a` INT, `b` BIT DEFAULT NULL, `c` BIT DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)) ENGINE= TokuDB;
|
||||
SET SQL_LOG_BIN= 1;
|
||||
CREATE TABLE t1 (`a` INT, `b` BIT DEFAULT b'01', `c` BIT DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)) ENGINE= TokuDB;
|
||||
************* EXECUTION WITH INSERTS *************
|
||||
INSERT INTO t1(a,b,c) VALUES (1, null, b'01');
|
||||
INSERT INTO t1(a,b,c) VALUES (2,b'00', b'01');
|
||||
INSERT INTO t1(a,b) VALUES (3, null);
|
||||
INSERT INTO t1(a,c) VALUES (4, b'01');
|
||||
INSERT INTO t1(a) VALUES (5);
|
||||
************* SHOWING THE RESULT SETS WITH INSERTS *************
|
||||
TABLES t1 and t2 must be different.
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT a,b+0,c+0 FROM t1 ORDER BY a;
|
||||
a b+0 c+0
|
||||
1 NULL 1
|
||||
2 0 1
|
||||
3 NULL NULL
|
||||
4 NULL 1
|
||||
5 NULL NULL
|
||||
SELECT a,b+0,c+0 FROM t1 ORDER BY a;
|
||||
a b+0 c+0
|
||||
1 NULL 1
|
||||
2 0 1
|
||||
3 NULL NULL
|
||||
4 NULL 1
|
||||
5 NULL NULL
|
||||
************* EXECUTION WITH UPDATES and REPLACES *************
|
||||
DELETE FROM t1;
|
||||
INSERT INTO t1(a,b,c) VALUES (1,b'00', b'01');
|
||||
REPLACE INTO t1(a,b,c) VALUES (2,b'00',b'01');
|
||||
UPDATE t1 set b= NULL, c= b'00' where a= 1;
|
||||
REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00');
|
||||
************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES *************
|
||||
TABLES t1 and t2 must be equal otherwise an error will be thrown.
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
DROP TABLE t1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
################################################################################
|
||||
# NULL ---> NOT NULL (STRICT MODE)
|
||||
# UNCOMMENT THIS AFTER FIXING BUG#43992
|
||||
################################################################################
|
||||
################################################################################
|
||||
# NULL ---> NOT NULL (NON-STRICT MODE)
|
||||
################################################################################
|
||||
SET SQL_LOG_BIN= 0;
|
||||
CREATE TABLE t1(`a` INT NOT NULL, `b` INT,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
CREATE TABLE t2(`a` INT NOT NULL, `b` INT,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
CREATE TABLE t3(`a` INT NOT NULL, `b` INT,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
SET SQL_LOG_BIN= 1;
|
||||
CREATE TABLE t1(`a` INT NOT NULL, `b` INT NOT NULL,
|
||||
`c` INT NOT NULL,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
CREATE TABLE t2(`a` INT NOT NULL, `b` INT NOT NULL,
|
||||
`c` INT,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
CREATE TABLE t3(`a` INT NOT NULL, `b` INT NOT NULL,
|
||||
`c` INT DEFAULT 500,
|
||||
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
|
||||
************* EXECUTION WITH INSERTS *************
|
||||
INSERT INTO t1(a) VALUES (1);
|
||||
INSERT INTO t1(a, b) VALUES (2, NULL);
|
||||
INSERT INTO t1(a, b) VALUES (3, 1);
|
||||
INSERT INTO t2(a) VALUES (1);
|
||||
INSERT INTO t2(a, b) VALUES (2, NULL);
|
||||
INSERT INTO t2(a, b) VALUES (3, 1);
|
||||
INSERT INTO t3(a) VALUES (1);
|
||||
INSERT INTO t3(a, b) VALUES (2, NULL);
|
||||
INSERT INTO t3(a, b) VALUES (3, 1);
|
||||
INSERT INTO t3(a, b) VALUES (4, 1);
|
||||
REPLACE INTO t3(a, b) VALUES (5, null);
|
||||
REPLACE INTO t3(a, b) VALUES (3, null);
|
||||
UPDATE t3 SET b = NULL where a = 4;
|
||||
************* SHOWING THE RESULT SETS *************
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
1 NULL
|
||||
2 NULL
|
||||
3 1
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b c
|
||||
1 0 0
|
||||
2 0 0
|
||||
3 1 0
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a b
|
||||
1 NULL
|
||||
2 NULL
|
||||
3 1
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a b c
|
||||
1 0 NULL
|
||||
2 0 NULL
|
||||
3 1 NULL
|
||||
SELECT * FROM t3 ORDER BY a;
|
||||
a b
|
||||
1 NULL
|
||||
2 NULL
|
||||
3 NULL
|
||||
4 NULL
|
||||
5 NULL
|
||||
SELECT * FROM t3 ORDER BY a;
|
||||
a b c
|
||||
1 0 500
|
||||
2 0 500
|
||||
3 0 500
|
||||
4 0 500
|
||||
5 0 500
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/rpl_end.inc
|
||||
|
|
@ -1,679 +0,0 @@
|
|||
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]
|
||||
CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'TokuDB' ;
|
||||
SELECT * FROM t1;
|
||||
C1 C2
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1;
|
||||
C1 C2
|
||||
INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X');
|
||||
INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A');
|
||||
SELECT * FROM t1 ORDER BY C1,C2;
|
||||
C1 C2
|
||||
A A
|
||||
A B
|
||||
A C
|
||||
X X
|
||||
X Y
|
||||
X Z
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1 ORDER BY C1,C2;
|
||||
C1 C2
|
||||
A A
|
||||
A B
|
||||
A C
|
||||
X X
|
||||
X Y
|
||||
X Z
|
||||
DELETE FROM t1 WHERE C1 = C2;
|
||||
SELECT * FROM t1 ORDER BY C1,C2;
|
||||
C1 C2
|
||||
A B
|
||||
A C
|
||||
X Y
|
||||
X Z
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1 ORDER BY C1,C2;
|
||||
C1 C2
|
||||
A B
|
||||
A C
|
||||
X Y
|
||||
X Z
|
||||
UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C';
|
||||
SELECT * FROM t1 ORDER BY C1,C2;
|
||||
C1 C2
|
||||
A B
|
||||
A I
|
||||
X Y
|
||||
X Z
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1 ORDER BY C1,C2;
|
||||
C1 C2
|
||||
A B
|
||||
A I
|
||||
X Y
|
||||
X Z
|
||||
include/assert.inc [Counter for COM_COMMIT is consistent with the number of actual commits]
|
||||
include/assert.inc [Counter for COM_INSERT is consistent with the number of actual inserts]
|
||||
include/assert.inc [Counter for COM_DELETE is consistent with the number of actual deletes]
|
||||
include/assert.inc [Counter for COM_UPDATE is consistent with the number of actual updates]
|
||||
UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N';
|
||||
SELECT * FROM t1 ORDER BY c1,c2;
|
||||
C1 C2
|
||||
A B
|
||||
A I
|
||||
X Y
|
||||
X Z
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1 ORDER BY c1,c2;
|
||||
C1 C2
|
||||
A B
|
||||
A I
|
||||
X Y
|
||||
X Z
|
||||
CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'TokuDB' ;
|
||||
INSERT INTO t2
|
||||
VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25),
|
||||
(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81);
|
||||
SELECT * FROM t2 ORDER BY c1,c2;
|
||||
c1 c12 c2
|
||||
1 A 2
|
||||
2 A 4
|
||||
3 A 9
|
||||
4 A 15
|
||||
5 A 25
|
||||
6 A 35
|
||||
7 A 50
|
||||
8 A 64
|
||||
9 A 81
|
||||
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
|
||||
c1 c12 c2
|
||||
2 A 4
|
||||
3 A 9
|
||||
5 A 25
|
||||
8 A 64
|
||||
9 A 81
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t2 ORDER BY c1,c2;
|
||||
c1 c12 c2
|
||||
1 A 2
|
||||
2 A 4
|
||||
3 A 9
|
||||
4 A 15
|
||||
5 A 25
|
||||
6 A 35
|
||||
7 A 50
|
||||
8 A 64
|
||||
9 A 81
|
||||
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
|
||||
c1 c12 c2
|
||||
2 A 4
|
||||
3 A 9
|
||||
5 A 25
|
||||
8 A 64
|
||||
9 A 81
|
||||
UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1;
|
||||
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
|
||||
c1 c12 c2
|
||||
1 A 1
|
||||
2 A 4
|
||||
3 A 9
|
||||
4 A 16
|
||||
5 A 25
|
||||
6 A 36
|
||||
7 A 49
|
||||
8 A 64
|
||||
9 A 81
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
|
||||
c1 c12 c2
|
||||
1 A 1
|
||||
2 A 4
|
||||
3 A 9
|
||||
4 A 16
|
||||
5 A 25
|
||||
6 A 36
|
||||
7 A 49
|
||||
8 A 64
|
||||
9 A 81
|
||||
UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999;
|
||||
SELECT * FROM t2 ORDER BY c1,c2;
|
||||
c1 c12 c2
|
||||
1 A 1
|
||||
2 A 4
|
||||
3 A 9
|
||||
4 A 16
|
||||
5 A 25
|
||||
6 A 36
|
||||
7 A 49
|
||||
8 A 64
|
||||
9 A 81
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t2 ORDER BY c1,c2;
|
||||
c1 c12 c2
|
||||
1 A 1
|
||||
2 A 4
|
||||
3 A 9
|
||||
4 A 16
|
||||
5 A 25
|
||||
6 A 36
|
||||
7 A 49
|
||||
8 A 64
|
||||
9 A 81
|
||||
DELETE FROM t2 WHERE c1 % 4 = 0;
|
||||
SELECT * FROM t2 ORDER BY c1,c2;
|
||||
c1 c12 c2
|
||||
1 A 1
|
||||
2 A 4
|
||||
3 A 9
|
||||
5 A 25
|
||||
6 A 36
|
||||
7 A 49
|
||||
9 A 81
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t2 ORDER BY c1,c2;
|
||||
c1 c12 c2
|
||||
1 A 1
|
||||
2 A 4
|
||||
3 A 9
|
||||
5 A 25
|
||||
6 A 36
|
||||
7 A 49
|
||||
9 A 81
|
||||
UPDATE t2 SET c12='X';
|
||||
CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'TokuDB' ;
|
||||
INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1);
|
||||
INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2);
|
||||
SELECT * FROM t3 ORDER BY C1,C2;
|
||||
C1 C2 pk1 C3 pk2
|
||||
A A 3 B 2
|
||||
A B 1 B 1
|
||||
A C 1 B 2
|
||||
X X 3 B 1
|
||||
X Y 2 B 1
|
||||
X Z 2 B 2
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t3 ORDER BY C1,C2;
|
||||
C1 C2 pk1 C3 pk2
|
||||
A A 3 B 2
|
||||
A B 1 B 1
|
||||
A C 1 B 2
|
||||
X X 3 B 1
|
||||
X Y 2 B 1
|
||||
X Z 2 B 2
|
||||
DELETE FROM t3 WHERE C1 = C2;
|
||||
SELECT * FROM t3 ORDER BY C1,C2;
|
||||
C1 C2 pk1 C3 pk2
|
||||
A B 1 B 1
|
||||
A C 1 B 2
|
||||
X Y 2 B 1
|
||||
X Z 2 B 2
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t3 ORDER BY C1,C2;
|
||||
C1 C2 pk1 C3 pk2
|
||||
A B 1 B 1
|
||||
A C 1 B 2
|
||||
X Y 2 B 1
|
||||
X Z 2 B 2
|
||||
UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C';
|
||||
SELECT * FROM t3 ORDER BY C1,C2;
|
||||
C1 C2 pk1 C3 pk2
|
||||
A B 1 B 1
|
||||
A I 1 B 2
|
||||
X Y 2 B 1
|
||||
X Z 2 B 2
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t3 ORDER BY C1,C2;
|
||||
C1 C2 pk1 C3 pk2
|
||||
A B 1 B 1
|
||||
A I 1 B 2
|
||||
X Y 2 B 1
|
||||
X Z 2 B 2
|
||||
CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'TokuDB';
|
||||
INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3);
|
||||
INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6);
|
||||
SELECT * FROM t6 ORDER BY C3;
|
||||
C1 C2 C3
|
||||
A B 1
|
||||
X Y 2
|
||||
X X 3
|
||||
A C 4
|
||||
X Z 5
|
||||
A A 6
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t6 ORDER BY C3;
|
||||
C1 C2 C3
|
||||
A B 1
|
||||
X Y 2
|
||||
X X 3
|
||||
A C 4
|
||||
X Z 5
|
||||
A A 6
|
||||
DELETE FROM t6 WHERE C1 = C2;
|
||||
SELECT * FROM t6 ORDER BY C3;
|
||||
C1 C2 C3
|
||||
A B 1
|
||||
X Y 2
|
||||
A C 4
|
||||
X Z 5
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t6 ORDER BY C3;
|
||||
C1 C2 C3
|
||||
A B 1
|
||||
X Y 2
|
||||
A C 4
|
||||
X Z 5
|
||||
UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C';
|
||||
SELECT * FROM t6 ORDER BY C3;
|
||||
C1 C2 C3
|
||||
A B 1
|
||||
X Y 2
|
||||
A I 4
|
||||
X Z 5
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t6 ORDER BY C3;
|
||||
C1 C2 C3
|
||||
A B 1
|
||||
X Y 2
|
||||
A I 4
|
||||
X Z 5
|
||||
CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'TokuDB' ;
|
||||
INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3);
|
||||
INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6);
|
||||
UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1;
|
||||
SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2;
|
||||
C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2
|
||||
X Q 2 1 R 1 X Y 2 S 1
|
||||
X Q 2 1 R 1 X Z 2 S 2
|
||||
X Q 2 2 R 4 X Y 2 S 1
|
||||
X Q 2 2 R 4 X Z 2 S 2
|
||||
X Q 2 3 R 9 X Y 2 S 1
|
||||
X Q 2 3 R 9 X Z 2 S 2
|
||||
X Q 2 5 R 25 X Y 2 S 1
|
||||
X Q 2 5 R 25 X Z 2 S 2
|
||||
X Q 2 6 R 36 X Y 2 S 1
|
||||
X Q 2 6 R 36 X Z 2 S 2
|
||||
X Q 2 7 R 49 X Y 2 S 1
|
||||
X Q 2 7 R 49 X Z 2 S 2
|
||||
X Q 2 9 R 81 X Y 2 S 1
|
||||
X Q 2 9 R 81 X Z 2 S 2
|
||||
X Q 3 1 R 1 X Y 2 S 1
|
||||
X Q 3 1 R 1 X Z 2 S 2
|
||||
X Q 3 2 R 4 X Y 2 S 1
|
||||
X Q 3 2 R 4 X Z 2 S 2
|
||||
X Q 3 3 R 9 X Y 2 S 1
|
||||
X Q 3 3 R 9 X Z 2 S 2
|
||||
X Q 3 5 R 25 X Y 2 S 1
|
||||
X Q 3 5 R 25 X Z 2 S 2
|
||||
X Q 3 6 R 36 X Y 2 S 1
|
||||
X Q 3 6 R 36 X Z 2 S 2
|
||||
X Q 3 7 R 49 X Y 2 S 1
|
||||
X Q 3 7 R 49 X Z 2 S 2
|
||||
X Q 3 9 R 81 X Y 2 S 1
|
||||
X Q 3 9 R 81 X Z 2 S 2
|
||||
X Q 5 1 R 1 X Y 2 S 1
|
||||
X Q 5 1 R 1 X Z 2 S 2
|
||||
X Q 5 2 R 4 X Y 2 S 1
|
||||
X Q 5 2 R 4 X Z 2 S 2
|
||||
X Q 5 3 R 9 X Y 2 S 1
|
||||
X Q 5 3 R 9 X Z 2 S 2
|
||||
X Q 5 5 R 25 X Y 2 S 1
|
||||
X Q 5 5 R 25 X Z 2 S 2
|
||||
X Q 5 6 R 36 X Y 2 S 1
|
||||
X Q 5 6 R 36 X Z 2 S 2
|
||||
X Q 5 7 R 49 X Y 2 S 1
|
||||
X Q 5 7 R 49 X Z 2 S 2
|
||||
X Q 5 9 R 81 X Y 2 S 1
|
||||
X Q 5 9 R 81 X Z 2 S 2
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2;
|
||||
C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2
|
||||
X Q 2 1 R 1 X Y 2 S 1
|
||||
X Q 2 1 R 1 X Z 2 S 2
|
||||
X Q 2 2 R 4 X Y 2 S 1
|
||||
X Q 2 2 R 4 X Z 2 S 2
|
||||
X Q 2 3 R 9 X Y 2 S 1
|
||||
X Q 2 3 R 9 X Z 2 S 2
|
||||
X Q 2 5 R 25 X Y 2 S 1
|
||||
X Q 2 5 R 25 X Z 2 S 2
|
||||
X Q 2 6 R 36 X Y 2 S 1
|
||||
X Q 2 6 R 36 X Z 2 S 2
|
||||
X Q 2 7 R 49 X Y 2 S 1
|
||||
X Q 2 7 R 49 X Z 2 S 2
|
||||
X Q 2 9 R 81 X Y 2 S 1
|
||||
X Q 2 9 R 81 X Z 2 S 2
|
||||
X Q 3 1 R 1 X Y 2 S 1
|
||||
X Q 3 1 R 1 X Z 2 S 2
|
||||
X Q 3 2 R 4 X Y 2 S 1
|
||||
X Q 3 2 R 4 X Z 2 S 2
|
||||
X Q 3 3 R 9 X Y 2 S 1
|
||||
X Q 3 3 R 9 X Z 2 S 2
|
||||
X Q 3 5 R 25 X Y 2 S 1
|
||||
X Q 3 5 R 25 X Z 2 S 2
|
||||
X Q 3 6 R 36 X Y 2 S 1
|
||||
X Q 3 6 R 36 X Z 2 S 2
|
||||
X Q 3 7 R 49 X Y 2 S 1
|
||||
X Q 3 7 R 49 X Z 2 S 2
|
||||
X Q 3 9 R 81 X Y 2 S 1
|
||||
X Q 3 9 R 81 X Z 2 S 2
|
||||
X Q 5 1 R 1 X Y 2 S 1
|
||||
X Q 5 1 R 1 X Z 2 S 2
|
||||
X Q 5 2 R 4 X Y 2 S 1
|
||||
X Q 5 2 R 4 X Z 2 S 2
|
||||
X Q 5 3 R 9 X Y 2 S 1
|
||||
X Q 5 3 R 9 X Z 2 S 2
|
||||
X Q 5 5 R 25 X Y 2 S 1
|
||||
X Q 5 5 R 25 X Z 2 S 2
|
||||
X Q 5 6 R 36 X Y 2 S 1
|
||||
X Q 5 6 R 36 X Z 2 S 2
|
||||
X Q 5 7 R 49 X Y 2 S 1
|
||||
X Q 5 7 R 49 X Z 2 S 2
|
||||
X Q 5 9 R 81 X Y 2 S 1
|
||||
X Q 5 9 R 81 X Z 2 S 2
|
||||
SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS;
|
||||
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY';
|
||||
CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'TokuDB' ;
|
||||
INSERT INTO t4 SET C1 = 1;
|
||||
SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
|
||||
C1 HEX(B1) HEX(B2)
|
||||
1 NULL 0
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
|
||||
C1 HEX(B1) HEX(B2)
|
||||
1 NULL 0
|
||||
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
|
||||
CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'TokuDB' ;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
--- on slave: original values ---
|
||||
INSERT INTO t7 VALUES (1,3), (2,6), (3,9);
|
||||
SELECT * FROM t7 ORDER BY C1;
|
||||
C1 C2
|
||||
1 3
|
||||
2 6
|
||||
3 9
|
||||
set @@global.slave_exec_mode= 'IDEMPOTENT';
|
||||
--- on master: new values inserted ---
|
||||
INSERT INTO t7 VALUES (1,2), (2,4), (3,6);
|
||||
SELECT * FROM t7 ORDER BY C1;
|
||||
C1 C2
|
||||
1 2
|
||||
2 4
|
||||
3 6
|
||||
include/sync_slave_sql_with_master.inc
|
||||
set @@global.slave_exec_mode= default;
|
||||
--- on slave: old values should be overwritten by replicated values ---
|
||||
SELECT * FROM t7 ORDER BY C1;
|
||||
C1 C2
|
||||
1 2
|
||||
2 4
|
||||
3 6
|
||||
--- on master ---
|
||||
CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'TokuDB' ;
|
||||
INSERT INTO t8 VALUES (99,99,99);
|
||||
INSERT INTO t8 VALUES (99,22,33);
|
||||
ERROR 23000: Duplicate entry '99' for key 'PRIMARY'
|
||||
INSERT INTO t8 VALUES (11,99,33);
|
||||
ERROR 23000: Duplicate entry '99' for key 'b'
|
||||
INSERT INTO t8 VALUES (11,22,99);
|
||||
ERROR 23000: Duplicate entry '99' for key 'c'
|
||||
SELECT * FROM t8 ORDER BY a;
|
||||
a b c
|
||||
99 99 99
|
||||
include/sync_slave_sql_with_master.inc
|
||||
--- on slave ---
|
||||
SELECT * FROM t8 ORDER BY a;
|
||||
a b c
|
||||
99 99 99
|
||||
INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9);
|
||||
SELECT * FROM t8 ORDER BY a;
|
||||
a b c
|
||||
1 2 3
|
||||
2 4 6
|
||||
3 6 9
|
||||
99 99 99
|
||||
set @@global.slave_exec_mode= 'IDEMPOTENT';
|
||||
--- on master ---
|
||||
INSERT INTO t8 VALUES (2,4,8);
|
||||
include/sync_slave_sql_with_master.inc
|
||||
set @@global.slave_exec_mode= default;
|
||||
--- on slave ---
|
||||
SELECT * FROM t8 ORDER BY a;
|
||||
a b c
|
||||
1 2 3
|
||||
2 4 8
|
||||
3 6 9
|
||||
99 99 99
|
||||
**** Test for BUG#31552 ****
|
||||
**** On Master ****
|
||||
DELETE FROM t1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/rpl_reset.inc
|
||||
**** On Master ****
|
||||
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
|
||||
**** On Master ****
|
||||
include/sync_slave_sql_with_master.inc
|
||||
set @@global.slave_exec_mode= 'IDEMPOTENT';
|
||||
DELETE FROM t1 WHERE C1 = 'L';
|
||||
DELETE FROM t1;
|
||||
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
||||
COUNT(*) 0
|
||||
include/sync_slave_sql_with_master.inc
|
||||
set @@global.slave_exec_mode= default;
|
||||
include/check_slave_is_running.inc
|
||||
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
||||
COUNT(*) 0
|
||||
**** Test for BUG#37076 ****
|
||||
**** On Master ****
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE);
|
||||
INSERT INTO t1 VALUES(
|
||||
'2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14');
|
||||
**** On Slave ****
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SELECT * FROM t1;
|
||||
a b c
|
||||
2005-11-14 01:01:01 2005-11-14 01:01:02 2005-11-14
|
||||
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
CREATE TABLE t1 (i INT NOT NULL,
|
||||
c CHAR(16) CHARACTER SET utf8 NOT NULL,
|
||||
j INT NOT NULL) ENGINE = 'TokuDB' ;
|
||||
CREATE TABLE t2 (i INT NOT NULL,
|
||||
c CHAR(16) CHARACTER SET utf8 NOT NULL,
|
||||
j INT NOT NULL) ENGINE = 'TokuDB' ;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
ALTER TABLE t2 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
|
||||
CREATE TABLE t3 (i INT NOT NULL,
|
||||
c CHAR(128) CHARACTER SET utf8 NOT NULL,
|
||||
j INT NOT NULL) ENGINE = 'TokuDB' ;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
ALTER TABLE t3 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
|
||||
CREATE TABLE t4 (i INT NOT NULL,
|
||||
c CHAR(128) CHARACTER SET utf8 NOT NULL,
|
||||
j INT NOT NULL) ENGINE = 'TokuDB' ;
|
||||
CREATE TABLE t5 (i INT NOT NULL,
|
||||
c CHAR(255) CHARACTER SET utf8 NOT NULL,
|
||||
j INT NOT NULL) ENGINE = 'TokuDB' ;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
ALTER TABLE t5 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
|
||||
CREATE TABLE t6 (i INT NOT NULL,
|
||||
c CHAR(255) CHARACTER SET utf8 NOT NULL,
|
||||
j INT NOT NULL) ENGINE = 'TokuDB' ;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
|
||||
CREATE TABLE t7 (i INT NOT NULL,
|
||||
c CHAR(255) CHARACTER SET utf8 NOT NULL,
|
||||
j INT NOT NULL) ENGINE = 'TokuDB' ;
|
||||
SET @saved_slave_type_conversions = @@slave_type_conversions;
|
||||
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
|
||||
[expecting slave to replicate correctly]
|
||||
INSERT INTO t1 VALUES (1, "", 1);
|
||||
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
[expecting slave to replicate correctly]
|
||||
INSERT INTO t2 VALUES (1, "", 1);
|
||||
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
|
||||
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
|
||||
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
|
||||
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: 1677");
|
||||
call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
|
||||
include/rpl_reset.inc
|
||||
[expecting slave to replicate correctly]
|
||||
INSERT INTO t4 VALUES (1, "", 1);
|
||||
INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2);
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/diff_tables.inc [master:t4, slave:t4]
|
||||
[expecting slave to stop]
|
||||
INSERT INTO t5 VALUES (1, "", 1);
|
||||
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
include/wait_for_slave_sql_error.inc [errno=1677]
|
||||
include/rpl_reset.inc
|
||||
[expecting slave to stop]
|
||||
INSERT INTO t6 VALUES (1, "", 1);
|
||||
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
include/wait_for_slave_sql_error.inc [errno=1677]
|
||||
include/rpl_reset.inc
|
||||
[expecting slave to replicate correctly]
|
||||
INSERT INTO t7 VALUES (1, "", 1);
|
||||
INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/diff_tables.inc [master:t7, slave:t7]
|
||||
drop table t1, t2, t3, t4, t5, t6, t7;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='TokuDB';
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
UPDATE t1 SET a = 10;
|
||||
ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
|
||||
INSERT INTO t1 VALUES (4);
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
drop table t1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1 (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`int_key` int(11) NOT NULL,
|
||||
`date_key` date NOT NULL,
|
||||
`date_nokey` date NOT NULL,
|
||||
`time_key` time NOT NULL,
|
||||
`time_nokey` time NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`datetime_nokey` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
`varchar_nokey` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `date_key` (`date_key`),
|
||||
KEY `time_key` (`time_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE='TokuDB';
|
||||
INSERT INTO t1 VALUES (1,8,5,'0000-00-00','0000-00-00','10:37:38','10:37:38','0000-00-00 00:00:00','0000-00-00 00:00:00','p','p'),(2,0,9,'0000-00-00','0000-00-00','00:00:00','00:00:00','2007-10-14 00:00:00','2007-10-14 00:00:00','d','d');
|
||||
CREATE TABLE t2 (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) NOT NULL,
|
||||
`int_key` int(11) NOT NULL,
|
||||
`date_key` date NOT NULL,
|
||||
`date_nokey` date NOT NULL,
|
||||
`time_key` time NOT NULL,
|
||||
`time_nokey` time NOT NULL,
|
||||
`datetime_key` datetime NOT NULL,
|
||||
`datetime_nokey` datetime NOT NULL,
|
||||
`varchar_key` varchar(1) NOT NULL,
|
||||
`varchar_nokey` varchar(1) NOT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `date_key` (`date_key`),
|
||||
KEY `time_key` (`time_key`),
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`varchar_key`)
|
||||
) ENGINE='TokuDB';
|
||||
INSERT INTO t2 VALUES (1,1,6,'2005-12-23','2005-12-23','02:24:28','02:24:28','0000-00-00 00:00:00','0000-00-00 00:00:00','g','g'),(2,0,3,'2009-09-14','2009-09-14','00:00:00','00:00:00','2000-01-30 16:39:40','2000-01-30 16:39:40','q','q'),(3,0,3,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','c','c'),(4,1,6,'2007-03-29','2007-03-29','15:49:00','15:49:00','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(5,4,0,'2002-12-04','2002-12-04','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','o','o'),(6,9,0,'2005-01-28','2005-01-28','00:00:00','00:00:00','2001-05-18 00:00:00','2001-05-18 00:00:00','w','w'),(7,6,0,'0000-00-00','0000-00-00','06:57:25','06:57:25','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(8,0,0,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','z','z'),(9,4,6,'2006-08-15','2006-08-15','00:00:00','00:00:00','2002-04-12 14:44:25','2002-04-12 14:44:25','j','j'),(10,0,5,'2006-12-20','2006-12-20','10:13:53','10:13:53','2008-07-22 00:00:00','2008-07-22 00:00:00','y','y'),(11,9,7,'0000-00-00','0000-00-00','00:00:00','00:00:00','2004-07-05 00:00:00','2004-07-05 00:00:00','{','{'),(12,4,3,'2007-01-26','2007-01-26','23:00:51','23:00:51','2001-05-16 00:00:00','2001-05-16 00:00:00','f','f'),(13,7,0,'2004-03-27','2004-03-27','00:00:00','00:00:00','2005-01-24 03:30:37','2005-01-24 03:30:37','',''),(14,6,0,'2006-07-26','2006-07-26','18:43:57','18:43:57','0000-00-00 00:00:00','0000-00-00 00:00:00','{','{'),(15,0,6,'2000-01-14','2000-01-14','00:00:00','00:00:00','2000-09-21 00:00:00','2000-09-21 00:00:00','o','o'),(16,9,8,'0000-00-00','0000-00-00','21:15:08','21:15:08','0000-00-00 00:00:00','0000-00-00 00:00:00','a','a'),(17,2,0,'2004-10-27','2004-10-27','00:00:00','00:00:00','2004-03-24 22:13:43','2004-03-24 22:13:43','',''),(18,7,4,'0000-00-00','0000-00-00','08:38:27','08:38:27','2002-03-18 19:51:44','2002-03-18 19:51:44','t','t'),(19,5,3,'2008-03-07','2008-03-07','03:29:07','03:29:07','2007-12-01 18:44:44','2007-12-01 18:44:44','t','t'),(20,0,0,'2002-04-09','2002-04-09','16:06:03','16:06:03','2009-04-22 00:00:00','2009-04-22 00:00:00','n','n');
|
||||
DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
|
||||
UPDATE t1 SET `int_key` = 3 ORDER BY `pk` LIMIT 4;
|
||||
DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
|
||||
DELETE FROM t2 WHERE `pk` < 6 LIMIT 1;
|
||||
UPDATE t1 SET `int_key` = 6 ORDER BY `pk` LIMIT 3;
|
||||
DELETE FROM t2 WHERE `pk` < 6 LIMIT 1;
|
||||
UPDATE t1 SET `pk` = 6 ORDER BY `int_key` LIMIT 6;
|
||||
ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
|
||||
DELETE FROM t2 WHERE `pk` < 7 LIMIT 1;
|
||||
UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
*** results: t2 must be consistent ****
|
||||
include/diff_tables.inc [master:t2, slave:t2]
|
||||
DROP TABLE t1, t2;
|
||||
EOF OF TESTS
|
||||
CREATE TABLE t1 (a int) ENGINE='TokuDB';
|
||||
INSERT IGNORE INTO t1 VALUES (NULL);
|
||||
INSERT INTO t1 ( a ) VALUES ( 0 );
|
||||
INSERT INTO t1 ( a ) VALUES ( 9 );
|
||||
INSERT INTO t1 ( a ) VALUES ( 2 );
|
||||
INSERT INTO t1 ( a ) VALUES ( 9 );
|
||||
INSERT INTO t1 ( a ) VALUES ( 5 );
|
||||
UPDATE t1 SET a = 5 WHERE a = 9;
|
||||
DELETE FROM t1 WHERE a < 6;
|
||||
UPDATE t1 SET a = 9 WHERE a < 3;
|
||||
INSERT INTO t1 ( a ) VALUES ( 3 );
|
||||
UPDATE t1 SET a = 0 WHERE a < 4;
|
||||
UPDATE t1 SET a = 8 WHERE a < 5;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
drop table t1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS;
|
||||
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY';
|
||||
CREATE TABLE t1 (a bit) ENGINE='TokuDB';
|
||||
INSERT IGNORE INTO t1 VALUES (NULL);
|
||||
INSERT INTO t1 ( a ) VALUES ( 0 );
|
||||
UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3;
|
||||
INSERT INTO t1 ( a ) VALUES ( 5 );
|
||||
DELETE FROM t1 WHERE a < 2 LIMIT 4;
|
||||
DELETE FROM t1 WHERE a < 9 LIMIT 4;
|
||||
INSERT INTO t1 ( a ) VALUES ( 9 );
|
||||
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
|
||||
INSERT INTO t1 ( a ) VALUES ( 8 );
|
||||
UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0;
|
||||
INSERT INTO t1 ( a ) VALUES ( 4 );
|
||||
INSERT INTO t1 ( a ) VALUES ( 3 );
|
||||
UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6;
|
||||
DELETE FROM t1 WHERE a = 4 LIMIT 7;
|
||||
UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9;
|
||||
UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2;
|
||||
DELETE FROM t1 WHERE a < 0 LIMIT 5;
|
||||
INSERT INTO t1 ( a ) VALUES ( 5 );
|
||||
UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4;
|
||||
INSERT INTO t1 ( a ) VALUES ( 5 );
|
||||
UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8;
|
||||
DELETE FROM t1 WHERE a < 8 LIMIT 8;
|
||||
INSERT INTO t1 ( a ) VALUES ( 6 );
|
||||
DELETE FROM t1 WHERE a < 6 LIMIT 7;
|
||||
UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7;
|
||||
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
|
||||
INSERT INTO t1 ( a ) VALUES ( 7 );
|
||||
DELETE FROM t1 WHERE a < 9 LIMIT 4;
|
||||
INSERT INTO t1 ( a ) VALUES ( 7 );
|
||||
INSERT INTO t1 ( a ) VALUES ( 6 );
|
||||
UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4;
|
||||
DELETE FROM t1 WHERE a = 2 LIMIT 9;
|
||||
DELETE FROM t1 WHERE a = 1 LIMIT 4;
|
||||
UPDATE t1 SET a = 4 WHERE a = 2 LIMIT 7;
|
||||
INSERT INTO t1 ( a ) VALUES ( 0 );
|
||||
DELETE FROM t1 WHERE a < 3 LIMIT 0;
|
||||
UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2;
|
||||
INSERT INTO t1 ( a ) VALUES ( 1 );
|
||||
UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
drop table t1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/rpl_end.inc
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
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]
|
||||
CREATE TABLE t1 (a INT) ENGINE=tokudb;
|
||||
begin;
|
||||
insert into t1 values(1);
|
||||
flush tables with read lock;
|
||||
commit;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
include/sync_slave_sql_with_master.inc
|
||||
include/rpl_end.inc
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#################################################################################
|
||||
# This test checks if the replication between "null" fields to either "null"
|
||||
# fields or "not null" fields works properly. In the first case, the execution
|
||||
# should work fine. In the second case, it may fail according to the sql_mode
|
||||
# being used.
|
||||
#
|
||||
# The test is devided in three main parts:
|
||||
#
|
||||
# 1 - NULL --> NULL (no failures)
|
||||
# 2 - NULL --> NOT NULL ( sql-mode = STRICT and failures)
|
||||
# 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures)
|
||||
#
|
||||
#################################################################################
|
||||
--source include/have_tokudb.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
let $engine=TokuDB;
|
||||
--source extra/rpl_tests/rpl_not_null.test
|
||||
--source include/rpl_end.inc
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--source include/have_tokudb.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
connection slave;
|
||||
let $bit_field_special = ALL_LOSSY;
|
||||
let $type = 'TokuDB';
|
||||
let $extra_index = ;
|
||||
--source extra/rpl_tests/rpl_row_basic.test
|
||||
|
||||
--source include/rpl_end.inc
|
||||
|
|
@ -1 +0,0 @@
|
|||
${?PB_HOST_SPECIFIC_MYSQLD_ARGS}
|
||||
|
|
@ -1 +0,0 @@
|
|||
${?PB_HOST_SPECIFIC_MYSQLD_ARGS}
|
||||
Loading…
Add table
Add a link
Reference in a new issue