Commit 8b0edbfb authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

Merge branch 'merge-tokudb-5.6' into 10.0

parents 13e4bf67 d5164569
......@@ -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);
......
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;
......
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
......@@ -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
......
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
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
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
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 --
......
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
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
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
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
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
-- 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
......
--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
--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;
......
--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
......
-- 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
......
# 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),
......
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
#################################################################################
# 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
--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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment