Commit 2116649d authored by Sergei Golubchik's avatar Sergei Golubchik

after-merge fix replication tests

* mostly update result files
* also updating test/include files to match 5.6
parent 7a213643
...@@ -62,24 +62,3 @@ UPDATE t1 SET c1= 0; ...@@ -62,24 +62,3 @@ UPDATE t1 SET c1= 0;
DROP TABLE t1; DROP TABLE t1;
-- sync_slave_with_master -- sync_slave_with_master
#
# BUG#11766865: 60091: RBR + NO PK + UPDATE NULL VALUE --> SLAVE BREAK WITH ERROR HA_ERR_END_OF_
#
--connection master
--source include/rpl_reset.inc
--connection master
--eval CREATE TABLE t1 (c1 int(11) NOT NULL, c2 int(11) NOT NULL, c3 int(11) DEFAULT '-1') ENGINE=$engine DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (1,2,NULL);
UPDATE t1 SET c1=1, c2=2, c3=-1 WHERE c1=1 AND c2=2 AND ISNULL(c3);
--sync_slave_with_master
--let $diff_tables=master:test.t1, slave:test.t1
--source include/diff_tables.inc
--connection master
DROP TABLE t1;
--sync_slave_with_master
...@@ -15,7 +15,8 @@ eval CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=$engine_type; ...@@ -15,7 +15,8 @@ eval CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=$engine_type;
INSERT INTO t1 SET name='Andy', age=31; INSERT INTO t1 SET name='Andy', age=31;
INSERT INTO t1 SET name='Jacob', age=2; INSERT INTO t1 SET name='Jacob', age=2;
INSERT INTO t1 SET name='Caleb', age=1; INSERT INTO t1 SET name='Caleb', age=1;
ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY,
ALGORITHM=COPY;
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
sync_slave_with_master; sync_slave_with_master;
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
......
...@@ -7,7 +7,8 @@ CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=InnoDB; ...@@ -7,7 +7,8 @@ CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=InnoDB;
INSERT INTO t1 SET name='Andy', age=31; INSERT INTO t1 SET name='Andy', age=31;
INSERT INTO t1 SET name='Jacob', age=2; INSERT INTO t1 SET name='Jacob', age=2;
INSERT INTO t1 SET name='Caleb', age=1; INSERT INTO t1 SET name='Caleb', age=1;
ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY,
ALGORITHM=COPY;
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
name age id name age id
Andy 31 00000001 Andy 31 00000001
......
...@@ -7,7 +7,8 @@ CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=MyISAM; ...@@ -7,7 +7,8 @@ CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=MyISAM;
INSERT INTO t1 SET name='Andy', age=31; INSERT INTO t1 SET name='Andy', age=31;
INSERT INTO t1 SET name='Jacob', age=2; INSERT INTO t1 SET name='Jacob', age=2;
INSERT INTO t1 SET name='Caleb', age=1; INSERT INTO t1 SET name='Caleb', age=1;
ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY,
ALGORITHM=COPY;
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
name age id name age id
Andy 31 00000001 Andy 31 00000001
......
...@@ -493,13 +493,13 @@ include/diff_tables.inc [master:t4, slave:t4] ...@@ -493,13 +493,13 @@ include/diff_tables.inc [master:t4, slave:t4]
[expecting slave to stop] [expecting slave to stop]
INSERT INTO t5 VALUES (1, "", 1); INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
include/wait_for_slave_sql_error.inc [errno=1677 ] include/wait_for_slave_sql_error.inc [errno=1677]
Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)'' Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)''
include/rpl_reset.inc include/rpl_reset.inc
[expecting slave to stop] [expecting slave to stop]
INSERT INTO t6 VALUES (1, "", 1); INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
include/wait_for_slave_sql_error.inc [errno=1677 ] include/wait_for_slave_sql_error.inc [errno=1677]
Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)'' Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)''
include/rpl_reset.inc include/rpl_reset.inc
[expecting slave to replicate correctly] [expecting slave to replicate correctly]
......
...@@ -496,13 +496,13 @@ include/diff_tables.inc [master:t4, slave:t4] ...@@ -496,13 +496,13 @@ include/diff_tables.inc [master:t4, slave:t4]
[expecting slave to stop] [expecting slave to stop]
INSERT INTO t5 VALUES (1, "", 1); INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
include/wait_for_slave_sql_error.inc [errno=1677 ] include/wait_for_slave_sql_error.inc [errno=1677]
Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)'' Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)''
include/rpl_reset.inc include/rpl_reset.inc
[expecting slave to stop] [expecting slave to stop]
INSERT INTO t6 VALUES (1, "", 1); INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
include/wait_for_slave_sql_error.inc [errno=1677 ] include/wait_for_slave_sql_error.inc [errno=1677]
Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)'' Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)''
include/rpl_reset.inc include/rpl_reset.inc
[expecting slave to replicate correctly] [expecting slave to replicate correctly]
......
...@@ -25,10 +25,4 @@ INSERT INTO t1(c1) VALUES (NULL); ...@@ -25,10 +25,4 @@ INSERT INTO t1(c1) VALUES (NULL);
UPDATE t1 SET c1= 0; UPDATE t1 SET c1= 0;
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1; DROP TABLE t1;
include/rpl_reset.inc
CREATE TABLE t1 (c1 int(11) NOT NULL, c2 int(11) NOT NULL, c3 int(11) DEFAULT '-1') ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES (1,2,NULL);
UPDATE t1 SET c1=1, c2=2, c3=-1 WHERE c1=1 AND c2=2 AND ISNULL(c3);
include/diff_tables.inc [master:test.t1, slave:test.t1]
DROP TABLE t1;
include/rpl_end.inc include/rpl_end.inc
...@@ -34,10 +34,4 @@ INSERT INTO t1(c1) VALUES (NULL); ...@@ -34,10 +34,4 @@ INSERT INTO t1(c1) VALUES (NULL);
UPDATE t1 SET c1= 0; UPDATE t1 SET c1= 0;
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1; DROP TABLE t1;
include/rpl_reset.inc
CREATE TABLE t1 (c1 int(11) NOT NULL, c2 int(11) NOT NULL, c3 int(11) DEFAULT '-1') ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES (1,2,NULL);
UPDATE t1 SET c1=1, c2=2, c3=-1 WHERE c1=1 AND c2=2 AND ISNULL(c3);
include/diff_tables.inc [master:test.t1, slave:test.t1]
DROP TABLE t1;
include/rpl_end.inc include/rpl_end.inc
#
# This is a load generator to call from rpl_parallel and rpl_sequential tests
#
#
# load volume parameter
#
let $iter = 20;
let $init_rows= 50;
#
# Distribution of queries within an iteration:
# legends:
# auto = auto_increment=1, trans = inside BEGIN-COMMIT,
# del = Delete, ins =- Insert, upd = Update
#
let $ins_auto_wk= 1;
let $ins_auto_nk= 1;
let $ins_trans_wk= 1;
let $ins_trans_nk= 1;
let $upd_trans_nk= 0;
let $upd_trans_wk= 1;
let $del_trans_nk= 0;
let $del_trans_wk= 1;
# windows run on PB2 is too slow to time out
disable_query_log;
if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") as "TRUE"`)
{
let $iter = 10;
}
enable_query_log;
let $databases = 16;
connection slave;
call mtr.add_suppression('Slave: Error dropping database'); ## todo: fix
source include/stop_slave.inc;
start slave;
connection master;
--disable_query_log
--disable_result_log
let $i = $databases + 1;
while($i)
{
let $i1 = $i;
dec $i1;
eval create database test$i1;
eval use test$i1;
create table ti_nk (a int, b int, c text) engine=tokudb;
create table ti_wk (a int auto_increment primary key, b int, c text) engine=tokudb;
let $l1= $init_rows;
while($l1)
{
eval insert into ti_nk values($l1, $i1, uuid());
dec $l1;
}
# this table is special - just for timing. It's more special on test0 db
# where it contains master timing of the load as well.
create table benchmark (state text) engine=myisam; # timestamp keep on the slave side
dec $i;
}
--enable_result_log
--enable_query_log
--sync_slave_with_master
#connection slave;
--disable_query_log
--disable_result_log
let $i = $databases + 1;
while($i)
{
let $i1 = $i;
dec $i1;
eval use test$i1;
alter table benchmark add ts timestamp not null default current_timestamp;
dec $i;
}
--enable_result_log
--enable_query_log
# not gather events into relay log w/o executing yet
stop slave sql_thread;
##call p1(1);
connection master;
--disable_query_log
--disable_result_log
#
# Load producer
#
# initial timestamp to record
# the extra ts col on slave is effective only with the STMT format (todo: bug-report)
set @save.binlog_format= @@session.binlog_format;
set @@session.binlog_format=STATEMENT;
let $i = $databases + 1;
while($i)
{
let $i1 = $i;
dec $i1;
eval use test$i1;
insert into benchmark set state='slave takes on load';
dec $i;
}
set @@session.binlog_format= @save.binlog_format;
connection slave;
use test0;
insert into benchmark set state='master started load';
connection master;
while ($iter)
{
let $i = $databases + 1;
while ($i)
{
let $i1 = $i;
dec $i1;
eval use test$i1;
let $ins= $ins_auto_nk;
while ($ins)
{
eval insert into ti_nk values($iter, $i1, uuid());
dec $ins;
}
let $ins= $ins_auto_wk;
while ($ins)
{
eval insert into ti_wk values(null, $i1, uuid());
dec $ins;
}
begin;
let $ins= $ins_trans_nk;
while ($ins)
{
eval insert into ti_nk values($iter, $i1, uuid());
dec $ins;
}
let $ins= $ins_trans_wk;
while ($ins)
{
eval insert into ti_wk values(null, $i1, repeat('a', round(rand()*10)));
dec $ins;
}
let $min=`select min(a) from ti_nk`;
let $del= $del_trans_nk;
while ($del)
{
eval delete from ti_nk where a= $min + $del;
dec $del;
}
let $min=`select min(a) from ti_nk`;
let $del= $del_trans_wk;
while ($del)
{
eval delete from ti_wk where a= $min + $del;
dec $del;
}
let $upd= $upd_trans_nk;
while ($upd)
{
update ti_nk set c= uuid();
dec $upd;
}
let $upd= $upd_trans_wk;
while ($upd)
{
update ti_wk set c= uuid();
dec $upd;
}
commit;
dec $i;
}
dec $iter;
}
connection slave;
use test0;
insert into benchmark set state='master ends load';
connection master;
# terminal timestamp to record
let $i = $databases + 1;
set @save.binlog_format= @@session.binlog_format;
set @@session.binlog_format=STATEMENT;
while($i)
{
let $i1 = $i;
dec $i1;
eval use test$i1;
insert into benchmark set state='slave is supposed to finish with load';
dec $i;
}
set @@session.binlog_format= @save.binlog_format;
--enable_result_log
--enable_query_log
connection slave;
## todo: record start and end time of appying to compare times of
# parallel and sequential execution.
--disable_result_log
insert into test0.benchmark set state='slave is processing load';
# To force filling timestamp cols with the slave local clock values
# to implement benchmarking.
# TODO: replace with another algorithm
#set @save.mts_exp_slave_local_timestamp=@@global.mts_exp_slave_local_timestamp;
#set @@global.mts_exp_slave_local_timestamp=1;
start slave sql_thread;
let $wait_timeout= 600;
let $wait_condition= SELECT count(*)+sleep(1) = 5 FROM test0.benchmark;
source include/wait_condition.inc;
use test0;
insert into benchmark set state='slave ends load';
# cleanup for files that could not be removed in the end of previous invocation.
let $MYSQLD_DATADIR= `select @@datadir`;
--remove_files_wildcard $MYSQLD_DATADIR *.out
use test;
let $benchmark_file= `select replace(concat("benchmark_",uuid(),".out"),"-","_")`;
--replace_regex /benchmark_.*.out/benchmark.out/
eval select * from test1.benchmark into outfile '$benchmark_file';
select ts from test0.benchmark where state like 'master started load' into @m_0;
select ts from test0.benchmark where state like 'master ends load' into @m_1;
select ts from test0.benchmark where state like 'slave takes on load' into @s_m0;
select ts from test0.benchmark where state like 'slave is supposed to finish with load' into @s_m1;
select ts from test0.benchmark where state like 'slave ends load' into @s_1;
select ts from test0.benchmark where state like 'slave is processing load' into @s_0;
let $delta_file= `select replace(concat("delta_",uuid(),".out"),"-","_")`;
--replace_regex /delta_.*.out/delta.out/
eval select time_to_sec(@m_1) - time_to_sec(@m_0) as 'delta_m',
time_to_sec(@s_1) - time_to_sec(@s_0) as 'delta_s',
time_to_sec(@s_m1) - time_to_sec(@s_m0) as 'delta_sm' into outfile '$delta_file';
#
# Consistency verification
#
let $i = $databases + 1;
while($i)
{
let $i1 = $i;
dec $i1;
# removing uuid() non-deterministic last collumn with statement format
connection master;
--disable_query_log
if (`select @@global.binlog_format like 'statement'`)
{
eval alter table test$i1.ti_nk drop c;
eval alter table test$i1.ti_wk drop c;
}
--disable_query_log
--sync_slave_with_master
let $diff_tables=master:test$i1.ti_nk, slave:test$i1.ti_nk;
source include/diff_tables.inc;
let $diff_tables=master:test$i1.ti_wk, slave:test$i1.ti_wk;
source include/diff_tables.inc;
dec $i;
}
--enable_result_log
--enable_query_log
connection master;
--disable_query_log
--disable_result_log
let $i = $databases + 1;
while($i)
{
let $i1 = $i;
dec $i1;
eval drop database test$i1;
dec $i;
}
--enable_result_log
--enable_query_log
--sync_slave_with_master
source include/have_innodb.inc;
#
# Bug#11401: Load data infile 'REPLACE INTO' fails on slave.
#
connection master;
CREATE TABLE t4 (
id INT(5) unsigned NOT NULL auto_increment,
name varchar(15) NOT NULL default '',
number varchar(35) NOT NULL default 'default',
PRIMARY KEY (id),
UNIQUE KEY unique_rec (name,number)
) ENGINE=TokuDB;
--disable_warnings
LOAD DATA
INFILE '../../std_data/loaddata_pair.dat'
REPLACE INTO TABLE t4
(name,number);
--enable_warnings
SELECT * FROM t4;
sync_slave_with_master;
SELECT * FROM t4;
connection master;
--disable_warnings
LOAD DATA
INFILE '../../std_data/loaddata_pair.dat'
REPLACE INTO TABLE t4
(name,number);
--enable_warnings
SELECT * FROM t4;
sync_slave_with_master;
SELECT * FROM t4;
connection master;
--disable_query_log
DROP TABLE t4;
--enable_query_log
sync_slave_with_master;
connection master;
# End of 4.1 tests
#
# Bug #26418: Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK
# on master
#
#Note Matthias: to be merged to rpl_ddl.test
FLUSH LOGS;
sync_slave_with_master;
FLUSH LOGS;
connection master;
let $engine_type= "TokuDB";
--disable_warnings
DROP DATABASE IF EXISTS mysqltest1;
--enable_warnings
CREATE DATABASE mysqltest1;
CREATE TEMPORARY TABLE mysqltest1.tmp (f1 BIGINT) ENGINE=InnoDB;
eval CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=$engine_type;
SET AUTOCOMMIT = 0;
sync_slave_with_master;
--echo -------- switch to slave --------
connection slave;
# We want to verify that the following transactions are written to the
# binlog, despite the transaction is rolled back. (They should be
# written to the binlog since they contain non-transactional DROP
# TEMPORARY TABLE). To see that, we use the auxiliary table t1, which
# is transactional (TokuDB) on master and MyISAM on slave. t1 should
# be transactional on master so that the insert into t1 does not cause
# the transaction to be logged. Since t1 is non-transactional on
# slave, the change will not be rolled back, so the inserted rows will
# stay in t1 and we can verify that the transaction was replicated.
ALTER TABLE mysqltest1.t1 ENGINE = MyISAM;
SHOW CREATE TABLE mysqltest1.t1;
--echo -------- switch to master --------
connection master;
INSERT INTO mysqltest1.t1 SET f1= 1;
DROP TEMPORARY TABLE mysqltest1.tmp;
--replace_column 2 #
ROLLBACK;
--error ER_NO_SUCH_TABLE
SHOW CREATE TABLE mysqltest1.tmp;
--echo ######### Must return no rows here #########
SELECT COUNT(*) FROM mysqltest1.t1;
INSERT INTO mysqltest1.t1 SET f1= 2;
CREATE TEMPORARY TABLE mysqltest1.tmp2(a INT) ENGINE=InnoDB;
--replace_column 2 #
ROLLBACK;
SHOW CREATE TABLE mysqltest1.tmp2;
--echo ######### Must return no rows here #########
SELECT COUNT(*) FROM mysqltest1.t1;
sync_slave_with_master;
--echo -------- switch to slave --------
connection slave;
--error ER_NO_SUCH_TABLE
SHOW CREATE TABLE mysqltest1.tmp;
--error ER_NO_SUCH_TABLE
SHOW CREATE TABLE mysqltest1.tmp2;
--echo ######### t1 has two rows here: the transaction not rolled back since t1 uses MyISAM #########
SELECT COUNT(*) FROM mysqltest1.t1;
FLUSH LOGS;
--echo -------- switch to master --------
connection master;
FLUSH LOGS;
DROP TEMPORARY TABLE IF EXISTS mysqltest1.tmp2;
DROP DATABASE mysqltest1;
--echo End of 5.1 tests
--echo #
--echo # Bug#39675 rename tables on innodb tables with pending
--echo # transactions causes slave data issue.
--echo #
--disable_warnings
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
--enable_warnings
CREATE TABLE t1 (
id INT PRIMARY KEY auto_increment,
b INT DEFAULT NULL
) ENGINE=TokuDB;
CREATE TABLE t2 (
id INT PRIMARY KEY auto_increment,
b INT DEFAULT NULL
) ENGINE=TokuDB;
INSERT INTO t1 (b) VALUES (1),(2),(3);
BEGIN;
INSERT INTO t1(b) VALUES (4);
--echo -------- switch to master1 --------
connection master1;
--send RENAME TABLE t1 TO t3, t2 TO t1;
--echo -------- switch to master --------
connection master;
# Need to wait until RENAME is received
let $wait_condition=
SELECT COUNT(*) = 1 FROM information_schema.processlist
WHERE info = "RENAME TABLE t1 TO t3, t2 TO t1" and
state = "Waiting for table metadata lock";
--source include/wait_condition.inc
COMMIT;
--echo -------- switch to master1 --------
connection master1;
--reap
--echo -------- switch to master --------
connection master;
SELECT * FROM t1;
SELECT * FROM t3;
sync_slave_with_master;
--echo -------- switch to slave --------
connection slave;
SELECT * FROM t1;
SELECT * FROM t3;
--echo -------- switch to master --------
connection master;
DROP TABLE t1;
DROP TABLE t3;
--echo End of 6.0 tests
include/master-slave.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] [connection master]
*** Prepare tables and data *** *** Prepare tables and data ***
CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=TokuDB; CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=TokuDB;
...@@ -12,24 +9,21 @@ Table Create Table ...@@ -12,24 +9,21 @@ Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
KEY `a` (`a`) KEY `a` (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SHOW CREATE TABLE t3; SHOW CREATE TABLE t3;
Table Create Table Table Create Table
t3 CREATE TABLE `t3` ( t3 CREATE TABLE `t3` (
`a` int(11) NOT NULL, `a` int(11) NOT NULL,
KEY `a` (`a`) KEY `a` (`a`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SELECT @@GLOBAL.slave_transaction_retries; SHOW VARIABLES LIKE 'slave_transaction_retries';
@@GLOBAL.slave_transaction_retries Variable_name Value
2 slave_transaction_retries 2
SELECT @@GLOBAL.innodb_lock_wait_timeout;
@@GLOBAL.innodb_lock_wait_timeout
4
include/stop_slave.inc include/stop_slave.inc
BEGIN; BEGIN;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
...@@ -41,24 +35,23 @@ COMMIT; ...@@ -41,24 +35,23 @@ COMMIT;
BEGIN; BEGIN;
SELECT * FROM t1 FOR UPDATE; SELECT * FROM t1 FOR UPDATE;
a a
include/start_slave.inc START SLAVE;
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
COMMIT; COMMIT;
include/check_slave_is_running.inc
SELECT * FROM t1; SELECT * FROM t1;
a a
1 1
SELECT * FROM t3; SELECT * FROM t3;
a a
3 3
include/check_slave_is_running.inc
*** Test lock wait timeout *** *** Test lock wait timeout ***
include/stop_slave.inc include/stop_slave.inc
DELETE FROM t2; DELETE FROM t2;
RESET MASTER; CHANGE MASTER TO MASTER_LOG_POS=<master_pos_begin>;
CHANGE MASTER TO MASTER_LOG_POS=MASTER_POS_BEGIN;
BEGIN; BEGIN;
SELECT * FROM t1 FOR UPDATE; SELECT * FROM t1 FOR UPDATE;
a a
...@@ -83,10 +76,11 @@ include/check_slave_is_running.inc ...@@ -83,10 +76,11 @@ include/check_slave_is_running.inc
*** Test lock wait timeout and purged relay logs *** *** Test lock wait timeout and purged relay logs ***
SET @my_max_relay_log_size= @@global.max_relay_log_size; SET @my_max_relay_log_size= @@global.max_relay_log_size;
SET global max_relay_log_size=0; SET global max_relay_log_size=0;
Warnings:
Warning 1292 Truncated incorrect max_relay_log_size value: '0'
include/stop_slave.inc include/stop_slave.inc
DELETE FROM t2; DELETE FROM t2;
RESET MASTER; CHANGE MASTER TO MASTER_LOG_POS=<master_pos_begin>;
CHANGE MASTER TO MASTER_LOG_POS=MASTER_POS_BEGIN;
BEGIN; BEGIN;
SELECT * FROM t1 FOR UPDATE; SELECT * FROM t1 FOR UPDATE;
a a
...@@ -111,31 +105,6 @@ a ...@@ -111,31 +105,6 @@ a
3 3
include/check_slave_is_running.inc include/check_slave_is_running.inc
*** Test the deadlock warning to be escalated into the error ***
delete from t1;
delete from t2;
delete from t3;
delete from t1;
delete from t2;
delete from t3;
set @save.slave_transaction_retries= @@global.slave_transaction_retries;
set @@global.slave_transaction_retries= 0;
include/stop_slave.inc
BEGIN;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (2), (2), (2), (2), (2), (2), (2), (2), (2), (2);
INSERT INTO t3 VALUES (3);
COMMIT;
BEGIN;
SELECT count(*) as zero FROM t1 FOR UPDATE;
zero
0
START SLAVE;
*** Now the slave must be stopped due to timeout ***
include/wait_for_slave_sql_error.inc [errno=1205]
rollback;
set @@global.slave_transaction_retries= @save.slave_transaction_retries;
include/start_slave.inc
*** Clean up *** *** Clean up ***
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
SET global max_relay_log_size= @my_max_relay_log_size; SET global max_relay_log_size= @my_max_relay_log_size;
......
include/master-slave.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] [connection master]
*********************************************************** ***********************************************************
...@@ -99,11 +96,13 @@ f5 DOUBLE DEFAULT '2.00', ...@@ -99,11 +96,13 @@ f5 DOUBLE DEFAULT '2.00',
f6 ENUM('a', 'b', 'c') default 'a', f6 ENUM('a', 'b', 'c') default 'a',
f7 DECIMAL(17,9) default '1000.00', f7 DECIMAL(17,9) default '1000.00',
f8 MEDIUMBLOB, f8 MEDIUMBLOB,
f9 NUMERIC(6,2) default '2000.00', f9 NUMERIC(6,4) default '2000.00',
f10 VARCHAR(1024), f10 VARCHAR(1024),
f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
f12 SET('a', 'b', 'c') default 'b') f12 SET('a', 'b', 'c') default 'b')
ENGINE=TokuDB; ENGINE=TokuDB;
Warnings:
Warning 1264 Out of range value for column 'f9' at row 1
CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
/* extra */ /* extra */
...@@ -120,11 +119,13 @@ CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), ...@@ -120,11 +119,13 @@ CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
f5 DOUBLE DEFAULT '2.00', f5 DOUBLE DEFAULT '2.00',
f6 DECIMAL(17,9) default '1000.00', f6 DECIMAL(17,9) default '1000.00',
f7 MEDIUMBLOB, f7 MEDIUMBLOB,
f8 NUMERIC(6,2) default '2000.00', f8 NUMERIC(6,4) default '2000.00',
f9 VARCHAR(1024), f9 VARCHAR(1024),
f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
f11 CHAR(255)) f11 CHAR(255))
ENGINE=TokuDB; ENGINE=TokuDB;
Warnings:
Warning 1264 Out of range value for column 'f8' at row 1
CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20), CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
/* extra */ /* extra */
...@@ -183,6 +184,9 @@ INSERT into t2 values (2, 2, 2, 'second', ...@@ -183,6 +184,9 @@ INSERT into t2 values (2, 2, 2, 'second',
(3, 3, 3, 'third', (3, 3, 3, 'third',
3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char', 3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char',
'01234567', 'c'); '01234567', 'c');
Warnings:
Warning 1264 Out of range value for column 'f9' at row 1
Warning 1264 Out of range value for column 'f9' at row 2
INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char'; INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char';
INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10: INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10:
binary data'; binary data';
...@@ -429,6 +433,7 @@ include/check_slave_is_running.inc ...@@ -429,6 +433,7 @@ include/check_slave_is_running.inc
** Stop and Reset Slave ** ** Stop and Reset Slave **
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
** create table slave side ** ** create table slave side **
CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
...@@ -438,9 +443,10 @@ CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) ...@@ -438,9 +443,10 @@ CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
c CHAR(5), e INT DEFAULT '1')ENGINE=TokuDB; c CHAR(5), e INT DEFAULT '1')ENGINE=TokuDB;
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
...@@ -454,6 +460,7 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT), ...@@ -454,6 +460,7 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
******************************************** ********************************************
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)''
*** Drop t10 *** *** Drop t10 ***
DROP TABLE t10; DROP TABLE t10;
...@@ -465,15 +472,17 @@ DROP TABLE t10; ...@@ -465,15 +472,17 @@ DROP TABLE t10;
*** Create t11 on slave *** *** Create t11 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
) ENGINE=TokuDB; ) ENGINE=TokuDB;
*** Create t11 on Master *** *** Create t11 on Master ***
CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE=TokuDB; c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE=TokuDB;
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
...@@ -487,6 +496,7 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT), ...@@ -487,6 +496,7 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
******************************************** ********************************************
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)''
*** Drop t11 *** *** Drop t11 ***
DROP TABLE t11; DROP TABLE t11;
...@@ -498,15 +508,17 @@ DROP TABLE t11; ...@@ -498,15 +508,17 @@ DROP TABLE t11;
*** Create t12 on slave *** *** Create t12 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
) ENGINE=TokuDB; ) ENGINE=TokuDB;
*** Create t12 on Master *** *** Create t12 on Master ***
CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE=TokuDB; c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE=TokuDB;
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
...@@ -539,6 +551,7 @@ DROP TABLE t12; ...@@ -539,6 +551,7 @@ DROP TABLE t12;
*** Create t14 on slave *** *** Create t14 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=TokuDB; ) ENGINE=TokuDB;
...@@ -547,9 +560,10 @@ CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), ...@@ -547,9 +560,10 @@ CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1', c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE=TokuDB; )ENGINE=TokuDB;
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1;
...@@ -594,12 +608,15 @@ c1 c3 hex(c4) c5 c6 ...@@ -594,12 +608,15 @@ c1 c3 hex(c4) c5 c6
* Bug30415 * * Bug30415 *
************ ************
include/wait_for_slave_sql_error.inc [errno=1091] include/wait_for_slave_sql_error.inc [errno=1091]
Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7''
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
*** Drop t14 *** *** Drop t14 ***
DROP TABLE t14; DROP TABLE t14;
DROP TABLE t14; DROP TABLE t14;
include/rpl_reset.inc RESET MASTER;
START SLAVE;
************************************************* *************************************************
* - Alter Master adding columns at end of table * * - Alter Master adding columns at end of table *
...@@ -608,6 +625,7 @@ include/rpl_reset.inc ...@@ -608,6 +625,7 @@ include/rpl_reset.inc
*** Create t15 on slave *** *** Create t15 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=TokuDB; ) ENGINE=TokuDB;
...@@ -616,9 +634,10 @@ CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5), ...@@ -616,9 +634,10 @@ CREATE TABLE t15 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1', c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE=TokuDB; )ENGINE=TokuDB;
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7; ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7;
...@@ -638,12 +657,15 @@ c1 hex(c4) c5 c6 c7 c2 ...@@ -638,12 +657,15 @@ c1 hex(c4) c5 c6 c7 c2
******************************************** ********************************************
include/wait_for_slave_sql_error.inc [errno=1054] include/wait_for_slave_sql_error.inc [errno=1054]
Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7''
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
*** Drop t15 *** *** Drop t15 ***
DROP TABLE t15; DROP TABLE t15;
DROP TABLE t15; DROP TABLE t15;
include/rpl_reset.inc RESET MASTER;
START SLAVE;
************************************************ ************************************************
* - Create index on Master column not on slave * * - Create index on Master column not on slave *
...@@ -652,6 +674,7 @@ include/rpl_reset.inc ...@@ -652,6 +674,7 @@ include/rpl_reset.inc
*** Create t16 on slave *** *** Create t16 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=TokuDB; ) ENGINE=TokuDB;
...@@ -660,9 +683,10 @@ CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5), ...@@ -660,9 +683,10 @@ CREATE TABLE t16 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1', c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE=TokuDB; )ENGINE=TokuDB;
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Create Index and Data Insert *** *** Master Create Index and Data Insert ***
CREATE INDEX part_of_c6 ON t16 (c6); CREATE INDEX part_of_c6 ON t16 (c6);
...@@ -682,12 +706,15 @@ c1 hex(c4) c5 c6 c7 ...@@ -682,12 +706,15 @@ c1 hex(c4) c5 c6 c7
***************** *****************
include/wait_for_slave_sql_error.inc [errno=1072] include/wait_for_slave_sql_error.inc [errno=1072]
Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)''
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
*** Drop t16 *** *** Drop t16 ***
DROP TABLE t16; DROP TABLE t16;
DROP TABLE t16; DROP TABLE t16;
include/rpl_reset.inc RESET MASTER;
START SLAVE;
***************************************************** *****************************************************
* - Delete rows using column on Master not on slave * * - Delete rows using column on Master not on slave *
...@@ -696,6 +723,7 @@ include/rpl_reset.inc ...@@ -696,6 +723,7 @@ include/rpl_reset.inc
*** Create t17 on slave *** *** Create t17 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=TokuDB; ) ENGINE=TokuDB;
...@@ -704,9 +732,10 @@ CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5), ...@@ -704,9 +732,10 @@ CREATE TABLE t17 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1', c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE=TokuDB; )ENGINE=TokuDB;
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
...@@ -752,6 +781,7 @@ DROP TABLE t17; ...@@ -752,6 +781,7 @@ DROP TABLE t17;
*** Create t18 on slave *** *** Create t18 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) CREATE TABLE t18 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=TokuDB; ) ENGINE=TokuDB;
...@@ -760,9 +790,10 @@ CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5), ...@@ -760,9 +790,10 @@ CREATE TABLE t18 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1', c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE=TokuDB; )ENGINE=TokuDB;
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
...@@ -807,6 +838,7 @@ DROP TABLE t18; ...@@ -807,6 +838,7 @@ DROP TABLE t18;
*** Create t5 on slave *** *** Create t5 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) CREATE TABLE t5 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE=TokuDB; ) ENGINE=TokuDB;
...@@ -815,9 +847,10 @@ CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5), ...@@ -815,9 +847,10 @@ CREATE TABLE t5 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 LONG, c6 LONG,
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE=TokuDB; )ENGINE=TokuDB;
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
...@@ -837,23 +870,4 @@ c1 hex(c4) c5 ...@@ -837,23 +870,4 @@ c1 hex(c4) c5
2 6231623162316231 JOE 2 6231623162316231 JOE
3 6231623162316231 QA 3 6231623162316231 QA
DROP TABLE t5; DROP TABLE t5;
include/rpl_reset.inc
SET NAMES utf8;
SET SQL_LOG_BIN=0;
CREATE TABLE t1 (c1 INT NOT NULL, c2 CHAR(255) CHARACTER SET UTF8 NOT NULL) ENGINE=TokuDB;
SET SQL_LOG_BIN=1;
CREATE TABLE t1 (c1 INT) ENGINE=TokuDB;
INSERT INTO t1 VALUES ();
SET @text= REPEAT(_utf8'ç', 255);
INSERT INTO t1 VALUES (1, @text);
SELECT * FROM t1 ORDER BY c1;
c1 c2
0
1 ççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççç
SELECT * FROM t1 ORDER BY c1;
c1
0
1
DROP TABLE t1;
include/rpl_end.inc include/rpl_end.inc
include/master-slave.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] [connection master]
call mtr.add_suppression("Slave: Unknown table 'test.t6' Error_code: 1051"); call mtr.add_suppression("Slave: Unknown table 't6' error.* 1051");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* error.* 1677");
call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
**** Diff Table Def Start **** **** Diff Table Def Start ****
*** On Slave *** *** On Slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
SET @saved_slave_type_conversions = @@slave_type_conversions; SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY'; SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
...@@ -18,8 +15,9 @@ ENGINE='TokuDB'; ...@@ -18,8 +15,9 @@ ENGINE='TokuDB';
*** Create t1 on Master *** *** Create t1 on Master ***
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA');
SELECT * FROM t1 ORDER BY a; SELECT * FROM t1 ORDER BY a;
...@@ -38,6 +36,7 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; ...@@ -38,6 +36,7 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
DROP TABLE t1; DROP TABLE t1;
*** Create t2 on slave *** *** Create t2 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5), CREATE TABLE t2 (a INT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00', d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2') e CHAR(5) DEFAULT 'TEST2')
...@@ -45,8 +44,7 @@ ENGINE='TokuDB'; ...@@ -45,8 +44,7 @@ ENGINE='TokuDB';
*** Create t2 on Master *** *** Create t2 on Master ***
CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10) CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(10)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
*** Start Slave *** RESET MASTER;
include/rpl_reset.inc
*** Master Data Insert *** *** Master Data Insert ***
INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING'); INSERT INTO t2 () VALUES(1,2,'Kyle, TEX'),(2,1,'JOE AUSTIN'),(3,4,'QA TESTING');
SELECT * FROM t2 ORDER BY a; SELECT * FROM t2 ORDER BY a;
...@@ -54,15 +52,21 @@ a b c ...@@ -54,15 +52,21 @@ a b c
1 2 Kyle, TEX 1 2 Kyle, TEX
2 1 JOE AUSTIN 2 1 JOE AUSTIN
3 4 QA TESTING 3 4 QA TESTING
*** Start Slave ***
START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1677] include/wait_for_slave_sql_error.inc [errno=1677]
Last_SQL_Error = 'Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)''
STOP SLAVE; STOP SLAVE;
include/rpl_reset.inc RESET SLAVE;
SELECT * FROM t2 ORDER BY a; SELECT * FROM t2 ORDER BY a;
a b c d e a b c d e
RESET MASTER;
START SLAVE;
*** Drop t2 *** *** Drop t2 ***
DROP TABLE t2; DROP TABLE t2;
*** Create t3 on slave *** *** Create t3 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00', d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2') e CHAR(5) DEFAULT 'TEST2')
...@@ -70,20 +74,23 @@ ENGINE='TokuDB'; ...@@ -70,20 +74,23 @@ ENGINE='TokuDB';
*** Create t3 on Master *** *** Create t3 on Master ***
CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1'; set @b1 = 'b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING');
****************************************************************** ********************************************
*** Expect slave to fail with Error ER_SLAVE_CONVERSION_FAILED *** *** Expect slave to fail with Error 1677 ***
****************************************************************** ********************************************
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)''
*** Drop t3 *** *** Drop t3 ***
DROP TABLE t3; DROP TABLE t3;
*** Create t4 on slave *** *** Create t4 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00', d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2') e CHAR(5) DEFAULT 'TEST2')
...@@ -91,19 +98,22 @@ ENGINE='TokuDB'; ...@@ -91,19 +98,22 @@ ENGINE='TokuDB';
*** Create t4 on Master *** *** Create t4 on Master ***
CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
(30000.22,4,'QA TESTING'); (30000.22,4,'QA TESTING');
****************************************************************** ********************************************
*** Expect slave to fail with Error ER_SLAVE_CONVERSION_FAILED *** *** Expect slave to fail with Error 1677 ***
****************************************************************** ********************************************
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)''
*** Drop t4 *** *** Drop t4 ***
DROP TABLE t4; DROP TABLE t4;
*** Create t5 on slave *** *** Create t5 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT, e DOUBLE, c FLOAT, d INT, e DOUBLE,
f DECIMAL(8,2))ENGINE='TokuDB'; f DECIMAL(8,2))ENGINE='TokuDB';
...@@ -111,34 +121,39 @@ f DECIMAL(8,2))ENGINE='TokuDB'; ...@@ -111,34 +121,39 @@ f DECIMAL(8,2))ENGINE='TokuDB';
CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6),
c DECIMAL(8,2), d BIT, e BLOB, c DECIMAL(8,2), d BIT, e BLOB,
f FLOAT) ENGINE='TokuDB'; f FLOAT) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
(2,'JOE',300.01,0,'b2b2',1.0000009); (2,'JOE',300.01,0,'b2b2',1.0000009);
****************************************************************** ********************************************
*** Expect slave to fail with Error ER_SLAVE_CONVERSION_FAILED *** *** Expect slave to fail with Error 1677 ***
****************************************************************** ********************************************
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)''
*** Drop t5 *** *** Drop t5 ***
DROP TABLE t5; DROP TABLE t5;
*** Create t6 on slave *** *** Create t6 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5),
c FLOAT, d INT)ENGINE='TokuDB'; c FLOAT, d INT)ENGINE='TokuDB';
*** Create t6 on Master *** *** Create t6 on Master ***
CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6),
c DECIMAL(8,2), d BIT c DECIMAL(8,2), d BIT
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
(2,'JOE',300.01,0); (2,'JOE',300.01,0);
****************************************************************** ********************************************
*** Expect slave to fail with Error ER_SLAVE_CONVERSION_FAILED *** *** Expect slave to fail with Error 1677 ***
****************************************************************** ********************************************
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error.inc [errno=1677]
Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)''
*** Drop t6 *** *** Drop t6 ***
include/rpl_reset.inc include/rpl_reset.inc
DROP TABLE t6; DROP TABLE t6;
...@@ -146,6 +161,7 @@ DROP TABLE t6; ...@@ -146,6 +161,7 @@ DROP TABLE t6;
**** Extra Colums Start **** **** Extra Colums Start ****
*** Create t7 on slave *** *** Create t7 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e CHAR(20) DEFAULT 'Extra Column Testing') e CHAR(20) DEFAULT 'Extra Column Testing')
...@@ -153,8 +169,9 @@ ENGINE='TokuDB'; ...@@ -153,8 +169,9 @@ ENGINE='TokuDB';
*** Create t7 on Master *** *** Create t7 on Master ***
CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1'; set @b1 = 'b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
...@@ -174,14 +191,16 @@ a b c d e ...@@ -174,14 +191,16 @@ a b c d e
DROP TABLE t7; DROP TABLE t7;
*** Create t8 on slave *** *** Create t8 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e INT)ENGINE='TokuDB'; e INT)ENGINE='TokuDB';
*** Create t8 on Master *** *** Create t8 on Master ***
CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
...@@ -189,9 +208,9 @@ INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); ...@@ -189,9 +208,9 @@ INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
*** Drop t8 *** *** Drop t8 ***
DROP TABLE t8; DROP TABLE t8;
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP d TIMESTAMP,
ON UPDATE CURRENT_TIMESTAMP,
e INT NOT NULL, e INT NOT NULL,
f text not null, f text not null,
g text, g text,
...@@ -200,8 +219,9 @@ i blob) ENGINE='TokuDB'; ...@@ -200,8 +219,9 @@ i blob) ENGINE='TokuDB';
*** Create t9 on Master *** *** Create t9 on Master ***
CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
...@@ -214,51 +234,59 @@ a b c d e f g h i ...@@ -214,51 +234,59 @@ a b c d e f g h i
DROP TABLE t9; DROP TABLE t9;
*** Create t10 on slave *** *** Create t10 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233',
c CHAR(5), e INT DEFAULT '1')ENGINE='TokuDB'; c CHAR(5), e INT DEFAULT '1')ENGINE='TokuDB';
*** Create t10 on Master *** *** Create t10 on Master ***
CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
****************************************************************** ********************************************
*** Expect slave to fail with Error ER_SLAVE_CONVERSION_FAILED *** *** Expect slave to fail with Error 1677 ***
****************************************************************** ********************************************
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double''
*** Drop t10 *** *** Drop t10 ***
DROP TABLE t10; DROP TABLE t10;
*** Create t11 on slave *** *** Create t11 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t11 (a INT KEY, b BLOB, f INT, CREATE TABLE t11 (a INT KEY, b BLOB, f INT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='TokuDB'; c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='TokuDB';
*** Create t11 on Master *** *** Create t11 on Master ***
CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
****************************************************************** ********************************************
*** Expect slave to fail with Error ER_SLAVE_CONVERSION_FAILED *** *** Expect slave to fail with Error 1677 ***
****************************************************************** ********************************************
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)''
*** Drop t11 *** *** Drop t11 ***
DROP TABLE t11; DROP TABLE t11;
*** Create t12 on slave *** *** Create t12 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='TokuDB'; c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='TokuDB';
*** Create t12 on Master *** *** Create t12 on Master ***
CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
...@@ -280,6 +308,7 @@ DROP TABLE t12; ...@@ -280,6 +308,7 @@ DROP TABLE t12;
*** BUG 22177 Start *** *** BUG 22177 Start ***
*** Create t13 on slave *** *** Create t13 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5),
d INT DEFAULT '1', d INT DEFAULT '1',
e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
...@@ -287,8 +316,9 @@ e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ...@@ -287,8 +316,9 @@ e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
*** Create t13 on Master *** *** Create t13 on Master ***
CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
...@@ -310,6 +340,7 @@ DROP TABLE t13; ...@@ -310,6 +340,7 @@ DROP TABLE t13;
*** Alter Master Table Testing Start *** *** Alter Master Table Testing Start ***
*** Create t14 on slave *** *** Create t14 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1', c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
...@@ -317,8 +348,9 @@ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ...@@ -317,8 +348,9 @@ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
*** Create t14 on Master *** *** Create t14 on Master ***
CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1;
ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2;
...@@ -340,6 +372,7 @@ c1 c2 c3 c4 c5 c6 c7 ...@@ -340,6 +372,7 @@ c1 c2 c3 c4 c5 c6 c7
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP 3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
*** Create t14a on slave *** *** Create t14a on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5), CREATE TABLE t14a (c1 INT KEY, c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1', c6 INT DEFAULT '1',
c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
...@@ -347,8 +380,9 @@ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ...@@ -347,8 +380,9 @@ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
*** Create t14a on Master *** *** Create t14a on Master ***
CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) CREATE TABLE t14a (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
...@@ -367,10 +401,12 @@ c1 c4 c5 c6 c7 ...@@ -367,10 +401,12 @@ c1 c4 c5 c6 c7
2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP 2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP
3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP 3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
*** Master Drop c5 *** *** Master Drop c5 ***
ALTER TABLE t14a DROP COLUMN c5; ALTER TABLE t14a DROP COLUMN c5;
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
...@@ -414,6 +450,7 @@ c1 c3 c5 c6 c7 ...@@ -414,6 +450,7 @@ c1 c3 c5 c6 c7
DROP TABLE t14; DROP TABLE t14;
*** Create t15 on slave *** *** Create t15 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5), c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1', c6 INT DEFAULT '1',
...@@ -422,11 +459,12 @@ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ...@@ -422,11 +459,12 @@ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
*** Create t15 on Master *** *** Create t15 on Master ***
CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5)) ENGINE='TokuDB'; c4 BLOB, c5 CHAR(5)) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
call mtr.add_suppression("Error .Unknown table .t6.. on query.* Error_code: 1051"); call mtr.add_suppression("Error .Unknown table .t6.. on query.* error.* 1051");
call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* Error_code: 1060"); call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* error.* 1060");
call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535"); call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* error.* 1535");
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
...@@ -446,10 +484,11 @@ c1 c2 c3 c4 c5 c6 c7 ...@@ -446,10 +484,11 @@ c1 c2 c3 c4 c5 c6 c7
3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP 3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP
*** Add column on master that is a Extra on Slave *** *** Add column on master that is a Extra on Slave ***
ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
******************************************************** ********************************************
*** Expect slave to fail with Error ER_DUP_FIELDNAME *** *** Expect slave to fail with Error 1060 ***
******************************************************** ********************************************
include/wait_for_slave_sql_error_and_skip.inc [errno=1060] include/wait_for_slave_sql_error_and_skip.inc [errno=1060]
Last_SQL_Error = 'Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5''
*** Try to insert in master **** *** Try to insert in master ****
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
SELECT * FROM t15 ORDER BY c1; SELECT * FROM t15 ORDER BY c1;
...@@ -469,6 +508,7 @@ c1 c2 c3 c4 c5 c6 c7 ...@@ -469,6 +508,7 @@ c1 c2 c3 c4 c5 c6 c7
DROP TABLE t15; DROP TABLE t15;
*** Create t16 on slave *** *** Create t16 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5), c4 BLOB, c5 CHAR(5),
c6 INT DEFAULT '1', c6 INT DEFAULT '1',
...@@ -477,8 +517,9 @@ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ...@@ -477,8 +517,9 @@ c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP
*** Create t16 on Master *** *** Create t16 on Master ***
CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT,
c4 BLOB, c5 CHAR(5))ENGINE='TokuDB'; c4 BLOB, c5 CHAR(5))ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
...@@ -508,7 +549,7 @@ t16 CREATE TABLE `t16` ( ...@@ -508,7 +549,7 @@ t16 CREATE TABLE `t16` (
`c4` blob, `c4` blob,
`c5` char(5) DEFAULT NULL, `c5` char(5) DEFAULT NULL,
PRIMARY KEY (`c1`) PRIMARY KEY (`c1`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
/*!50100 PARTITION BY KEY (c1) /*!50100 PARTITION BY KEY (c1)
PARTITIONS 4 */ PARTITIONS 4 */
*** Show table on Slave **** *** Show table on Slave ****
...@@ -523,7 +564,7 @@ t16 CREATE TABLE `t16` ( ...@@ -523,7 +564,7 @@ t16 CREATE TABLE `t16` (
`c6` int(11) DEFAULT '1', `c6` int(11) DEFAULT '1',
`c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`c1`) PRIMARY KEY (`c1`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
/*!50100 PARTITION BY KEY (c1) /*!50100 PARTITION BY KEY (c1)
PARTITIONS 4 */ PARTITIONS 4 */
*** DROP TABLE t16 *** *** DROP TABLE t16 ***
...@@ -531,6 +572,7 @@ DROP TABLE t16; ...@@ -531,6 +572,7 @@ DROP TABLE t16;
*** Alter Master End *** *** Alter Master End ***
*** Create t17 on slave *** *** Create t17 on slave ***
STOP SLAVE; STOP SLAVE;
RESET SLAVE;
CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5),
d FLOAT DEFAULT '2.00', d FLOAT DEFAULT '2.00',
e CHAR(5) DEFAULT 'TEST2') e CHAR(5) DEFAULT 'TEST2')
...@@ -538,14 +580,16 @@ ENGINE='TokuDB'; ...@@ -538,14 +580,16 @@ ENGINE='TokuDB';
*** Create t17 on Master *** *** Create t17 on Master ***
CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10)
) ENGINE='TokuDB'; ) ENGINE='TokuDB';
RESET MASTER;
*** Start Slave *** *** Start Slave ***
include/rpl_reset.inc START SLAVE;
*** Master Data Insert *** *** Master Data Insert ***
INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
****************************************************************** ********************************************
*** Expect slave to fail with Error ER_SLAVE_CONVERSION_FAILED *** *** Expect slave to fail with Error 1677 ***
****************************************************************** ********************************************
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)''
** DROP table t17 *** ** DROP table t17 ***
DROP TABLE t17; DROP TABLE t17;
include/rpl_end.inc include/rpl_end.inc
include/master-slave.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] [connection master]
CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=TokuDB; CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=TokuDB;
CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=TokuDB; CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=TokuDB;
...@@ -21,7 +18,6 @@ SELECT * FROM t2 ORDER BY b; ...@@ -21,7 +18,6 @@ SELECT * FROM t2 ORDER BY b;
b c b c
5 0 5 0
6 11 6 11
include/sync_slave_sql_with_master.inc
SELECT * FROM t1 ORDER BY a; SELECT * FROM t1 ORDER BY a;
a a
10 10
...@@ -37,11 +33,9 @@ CREATE TABLE t3 ( a INT UNIQUE ); ...@@ -37,11 +33,9 @@ CREATE TABLE t3 ( a INT UNIQUE );
SET FOREIGN_KEY_CHECKS=0; SET FOREIGN_KEY_CHECKS=0;
INSERT INTO t3 VALUES (1),(1); INSERT INTO t3 VALUES (1),(1);
Got one of the listed errors Got one of the listed errors
include/sync_slave_sql_with_master.inc
SET FOREIGN_KEY_CHECKS=0; SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS t1,t2,t3; DROP TABLE IF EXISTS t1,t2,t3;
SET FOREIGN_KEY_CHECKS=1; SET FOREIGN_KEY_CHECKS=1;
include/sync_slave_sql_with_master.inc
create table t1 (b int primary key) engine = TokuDB; create table t1 (b int primary key) engine = TokuDB;
create table t2 (a int primary key, b int, foreign key (b) references t1(b)) create table t2 (a int primary key, b int, foreign key (b) references t1(b))
engine = TokuDB; engine = TokuDB;
...@@ -50,7 +44,6 @@ insert into t2 set a=1, b=1; ...@@ -50,7 +44,6 @@ insert into t2 set a=1, b=1;
set foreign_key_checks=0; set foreign_key_checks=0;
delete from t1; delete from t1;
must sync w/o a problem (could not with the buggy code) must sync w/o a problem (could not with the buggy code)
include/sync_slave_sql_with_master.inc
select count(*) from t1 /* must be zero */; select count(*) from t1 /* must be zero */;
count(*) count(*)
0 0
......
include/master-slave.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] [connection master]
SET SQL_LOG_BIN= 0; SET SQL_LOG_BIN= 0;
CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL, CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL,
`c` INT DEFAULT NULL, `c` INT DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL, CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
CREATE TABLE t3(`a` INT, `b` DATE DEFAULT NULL, CREATE TABLE t3(`a` INT, `b` DATE DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
CREATE TABLE t4(`a` INT, `b` DATE DEFAULT NULL, CREATE TABLE t4(`a` INT, `b` DATE DEFAULT NULL,
`c` INT DEFAULT NULL, `c` INT DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
SET SQL_LOG_BIN= 1; SET SQL_LOG_BIN= 1;
CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL, CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL,
`c` INT DEFAULT NULL, `c` INT DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL, CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
CREATE TABLE t3(`a` INT, `b` DATE DEFAULT '0000-00-00', CREATE TABLE t3(`a` INT, `b` DATE DEFAULT '0000-00-00',
`c` INT DEFAULT 500, `c` INT DEFAULT 500,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
CREATE TABLE t4(`a` INT, `b` DATE DEFAULT '0000-00-00', CREATE TABLE t4(`a` INT, `b` DATE DEFAULT '0000-00-00',
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
************* EXECUTION WITH INSERTS ************* ************* EXECUTION WITH INSERTS *************
INSERT INTO t1(a,b,c) VALUES (1, null, 1); 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,c) VALUES (2,'1111-11-11', 2);
...@@ -43,7 +40,6 @@ INSERT INTO t4(a,b) VALUES (3, null); ...@@ -43,7 +40,6 @@ INSERT INTO t4(a,b) VALUES (3, null);
INSERT INTO t4(a,c) VALUES (4, 4); INSERT INTO t4(a,c) VALUES (4, 4);
INSERT INTO t4(a) VALUES (5); INSERT INTO t4(a) VALUES (5);
************* SHOWING THE RESULT SETS WITH INSERTS ************* ************* 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. 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:t1, slave:t1]
include/diff_tables.inc [master:t2, slave:t2] include/diff_tables.inc [master:t2, slave:t2]
...@@ -79,7 +75,6 @@ REPLACE INTO t1(a,b,c) VALUES (2,'1111-11-11', 2); ...@@ -79,7 +75,6 @@ REPLACE INTO t1(a,b,c) VALUES (2,'1111-11-11', 2);
UPDATE t1 set b= NULL, c= 300 where a= 1; UPDATE t1 set b= NULL, c= 300 where a= 1;
REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300); REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300);
************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* ************* 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. 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:t1, slave:t1]
************* CLEANING ************* ************* CLEANING *************
...@@ -87,13 +82,12 @@ DROP TABLE t1; ...@@ -87,13 +82,12 @@ DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t3; DROP TABLE t3;
DROP TABLE t4; DROP TABLE t4;
include/sync_slave_sql_with_master.inc
SET SQL_LOG_BIN= 0; SET SQL_LOG_BIN= 0;
CREATE TABLE t1 (`a` INT, `b` BIT DEFAULT NULL, `c` BIT DEFAULT NULL, CREATE TABLE t1 (`a` INT, `b` BIT DEFAULT NULL, `c` BIT DEFAULT NULL,
PRIMARY KEY (`a`)) ENGINE= Innodb; PRIMARY KEY (`a`)) ENGINE= TokuDB;
SET SQL_LOG_BIN= 1; SET SQL_LOG_BIN= 1;
CREATE TABLE t1 (`a` INT, `b` BIT DEFAULT b'01', `c` BIT DEFAULT NULL, CREATE TABLE t1 (`a` INT, `b` BIT DEFAULT b'01', `c` BIT DEFAULT NULL,
PRIMARY KEY (`a`)) ENGINE= Innodb; PRIMARY KEY (`a`)) ENGINE= TokuDB;
************* EXECUTION WITH INSERTS ************* ************* EXECUTION WITH INSERTS *************
INSERT INTO t1(a,b,c) VALUES (1, null, b'01'); 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,c) VALUES (2,b'00', b'01');
...@@ -102,7 +96,6 @@ INSERT INTO t1(a,c) VALUES (4, b'01'); ...@@ -102,7 +96,6 @@ INSERT INTO t1(a,c) VALUES (4, b'01');
INSERT INTO t1(a) VALUES (5); INSERT INTO t1(a) VALUES (5);
************* SHOWING THE RESULT SETS WITH INSERTS ************* ************* SHOWING THE RESULT SETS WITH INSERTS *************
TABLES t1 and t2 must be different. 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; SELECT a,b+0,c+0 FROM t1 ORDER BY a;
a b+0 c+0 a b+0 c+0
1 NULL 1 1 NULL 1
...@@ -125,10 +118,8 @@ UPDATE t1 set b= NULL, c= b'00' where a= 1; ...@@ -125,10 +118,8 @@ UPDATE t1 set b= NULL, c= b'00' where a= 1;
REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00'); REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00');
************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES *************
TABLES t1 and t2 must be equal otherwise an error will be thrown. 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] include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1; DROP TABLE t1;
include/sync_slave_sql_with_master.inc
################################################################################ ################################################################################
# NULL ---> NOT NULL (STRICT MODE) # NULL ---> NOT NULL (STRICT MODE)
# UNCOMMENT THIS AFTER FIXING BUG#43992 # UNCOMMENT THIS AFTER FIXING BUG#43992
...@@ -138,21 +129,21 @@ include/sync_slave_sql_with_master.inc ...@@ -138,21 +129,21 @@ include/sync_slave_sql_with_master.inc
################################################################################ ################################################################################
SET SQL_LOG_BIN= 0; SET SQL_LOG_BIN= 0;
CREATE TABLE t1(`a` INT NOT NULL, `b` INT, CREATE TABLE t1(`a` INT NOT NULL, `b` INT,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
CREATE TABLE t2(`a` INT NOT NULL, `b` INT, CREATE TABLE t2(`a` INT NOT NULL, `b` INT,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
CREATE TABLE t3(`a` INT NOT NULL, `b` INT, CREATE TABLE t3(`a` INT NOT NULL, `b` INT,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
SET SQL_LOG_BIN= 1; SET SQL_LOG_BIN= 1;
CREATE TABLE t1(`a` INT NOT NULL, `b` INT NOT NULL, CREATE TABLE t1(`a` INT NOT NULL, `b` INT NOT NULL,
`c` INT NOT NULL, `c` INT NOT NULL,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
CREATE TABLE t2(`a` INT NOT NULL, `b` INT NOT NULL, CREATE TABLE t2(`a` INT NOT NULL, `b` INT NOT NULL,
`c` INT, `c` INT,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
CREATE TABLE t3(`a` INT NOT NULL, `b` INT NOT NULL, CREATE TABLE t3(`a` INT NOT NULL, `b` INT NOT NULL,
`c` INT DEFAULT 500, `c` INT DEFAULT 500,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
************* EXECUTION WITH INSERTS ************* ************* EXECUTION WITH INSERTS *************
INSERT INTO t1(a) VALUES (1); INSERT INTO t1(a) VALUES (1);
INSERT INTO t1(a, b) VALUES (2, NULL); INSERT INTO t1(a, b) VALUES (2, NULL);
...@@ -168,7 +159,6 @@ REPLACE INTO t3(a, b) VALUES (5, null); ...@@ -168,7 +159,6 @@ REPLACE INTO t3(a, b) VALUES (5, null);
REPLACE INTO t3(a, b) VALUES (3, null); REPLACE INTO t3(a, b) VALUES (3, null);
UPDATE t3 SET b = NULL where a = 4; UPDATE t3 SET b = NULL where a = 4;
************* SHOWING THE RESULT SETS ************* ************* SHOWING THE RESULT SETS *************
include/sync_slave_sql_with_master.inc
SELECT * FROM t1 ORDER BY a; SELECT * FROM t1 ORDER BY a;
a b a b
1 NULL 1 NULL
...@@ -206,5 +196,4 @@ a b c ...@@ -206,5 +196,4 @@ a b c
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t3; DROP TABLE t3;
include/sync_slave_sql_with_master.inc
include/rpl_end.inc include/rpl_end.inc
include/master-slave.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] [connection master]
call mtr.add_suppression('Slave: Error dropping database'); call mtr.add_suppression('Slave: Error dropping database');
include/stop_slave.inc include/stop_slave.inc
start slave; start slave;
include/sync_slave_sql_with_master.inc
stop slave sql_thread; stop slave sql_thread;
insert into test0.benchmark set state='slave is processing load'; insert into test0.benchmark set state='slave is processing load';
start slave sql_thread; start slave sql_thread;
...@@ -21,53 +17,36 @@ select ts from test0.benchmark where state like 'slave is supposed to finish wit ...@@ -21,53 +17,36 @@ select ts from test0.benchmark where state like 'slave is supposed to finish wit
select ts from test0.benchmark where state like 'slave ends load' into @s_1; select ts from test0.benchmark where state like 'slave ends load' into @s_1;
select ts from test0.benchmark where state like 'slave is processing load' into @s_0; select ts from test0.benchmark where state like 'slave is processing load' into @s_0;
select time_to_sec(@m_1) - time_to_sec(@m_0) as 'delta.out'; select time_to_sec(@m_1) - time_to_sec(@m_0) as 'delta.out';
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test15.ti_nk, slave:test15.ti_nk] include/diff_tables.inc [master:test15.ti_nk, slave:test15.ti_nk]
include/diff_tables.inc [master:test15.ti_wk, slave:test15.ti_wk] include/diff_tables.inc [master:test15.ti_wk, slave:test15.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test14.ti_nk, slave:test14.ti_nk] include/diff_tables.inc [master:test14.ti_nk, slave:test14.ti_nk]
include/diff_tables.inc [master:test14.ti_wk, slave:test14.ti_wk] include/diff_tables.inc [master:test14.ti_wk, slave:test14.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test13.ti_nk, slave:test13.ti_nk] include/diff_tables.inc [master:test13.ti_nk, slave:test13.ti_nk]
include/diff_tables.inc [master:test13.ti_wk, slave:test13.ti_wk] include/diff_tables.inc [master:test13.ti_wk, slave:test13.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test12.ti_nk, slave:test12.ti_nk] include/diff_tables.inc [master:test12.ti_nk, slave:test12.ti_nk]
include/diff_tables.inc [master:test12.ti_wk, slave:test12.ti_wk] include/diff_tables.inc [master:test12.ti_wk, slave:test12.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test11.ti_nk, slave:test11.ti_nk] include/diff_tables.inc [master:test11.ti_nk, slave:test11.ti_nk]
include/diff_tables.inc [master:test11.ti_wk, slave:test11.ti_wk] include/diff_tables.inc [master:test11.ti_wk, slave:test11.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test10.ti_nk, slave:test10.ti_nk] include/diff_tables.inc [master:test10.ti_nk, slave:test10.ti_nk]
include/diff_tables.inc [master:test10.ti_wk, slave:test10.ti_wk] include/diff_tables.inc [master:test10.ti_wk, slave:test10.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test9.ti_nk, slave:test9.ti_nk] include/diff_tables.inc [master:test9.ti_nk, slave:test9.ti_nk]
include/diff_tables.inc [master:test9.ti_wk, slave:test9.ti_wk] include/diff_tables.inc [master:test9.ti_wk, slave:test9.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test8.ti_nk, slave:test8.ti_nk] include/diff_tables.inc [master:test8.ti_nk, slave:test8.ti_nk]
include/diff_tables.inc [master:test8.ti_wk, slave:test8.ti_wk] include/diff_tables.inc [master:test8.ti_wk, slave:test8.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test7.ti_nk, slave:test7.ti_nk] include/diff_tables.inc [master:test7.ti_nk, slave:test7.ti_nk]
include/diff_tables.inc [master:test7.ti_wk, slave:test7.ti_wk] include/diff_tables.inc [master:test7.ti_wk, slave:test7.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test6.ti_nk, slave:test6.ti_nk] include/diff_tables.inc [master:test6.ti_nk, slave:test6.ti_nk]
include/diff_tables.inc [master:test6.ti_wk, slave:test6.ti_wk] include/diff_tables.inc [master:test6.ti_wk, slave:test6.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test5.ti_nk, slave:test5.ti_nk] include/diff_tables.inc [master:test5.ti_nk, slave:test5.ti_nk]
include/diff_tables.inc [master:test5.ti_wk, slave:test5.ti_wk] include/diff_tables.inc [master:test5.ti_wk, slave:test5.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test4.ti_nk, slave:test4.ti_nk] include/diff_tables.inc [master:test4.ti_nk, slave:test4.ti_nk]
include/diff_tables.inc [master:test4.ti_wk, slave:test4.ti_wk] include/diff_tables.inc [master:test4.ti_wk, slave:test4.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test3.ti_nk, slave:test3.ti_nk] include/diff_tables.inc [master:test3.ti_nk, slave:test3.ti_nk]
include/diff_tables.inc [master:test3.ti_wk, slave:test3.ti_wk] include/diff_tables.inc [master:test3.ti_wk, slave:test3.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test2.ti_nk, slave:test2.ti_nk] include/diff_tables.inc [master:test2.ti_nk, slave:test2.ti_nk]
include/diff_tables.inc [master:test2.ti_wk, slave:test2.ti_wk] include/diff_tables.inc [master:test2.ti_wk, slave:test2.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test1.ti_nk, slave:test1.ti_nk] include/diff_tables.inc [master:test1.ti_nk, slave:test1.ti_nk]
include/diff_tables.inc [master:test1.ti_wk, slave:test1.ti_wk] include/diff_tables.inc [master:test1.ti_wk, slave:test1.ti_wk]
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:test0.ti_nk, slave:test0.ti_nk] include/diff_tables.inc [master:test0.ti_nk, slave:test0.ti_nk]
include/diff_tables.inc [master:test0.ti_wk, slave:test0.ti_wk] include/diff_tables.inc [master:test0.ti_wk, slave:test0.ti_wk]
include/sync_slave_sql_with_master.inc
include/rpl_end.inc include/rpl_end.inc
include/master-slave.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.
Warnings:
Note 1753 slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
[connection master] [connection master]
drop table if exists t; drop table if exists t;
create table t (a bigint not null, primary key(a)) engine=tokudb; create table t (a bigint not null, primary key(a)) engine=tokudb;
......
include/master-slave.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.
Warnings:
Note 1753 slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
[connection master] [connection master]
drop table if exists t; drop table if exists t;
create table t (a bigint not null, b bigint not null, primary key(a)) engine=tokudb; create table t (a bigint not null, b bigint not null, primary key(a)) engine=tokudb;
...@@ -18,9 +13,6 @@ update t set b=b+4 where a=3; ...@@ -18,9 +13,6 @@ update t set b=b+4 where a=3;
update t set b=b+1 where 1<=a and a<=3; update t set b=b+1 where 1<=a and a<=3;
select unix_timestamp() into @tstart; select unix_timestamp() into @tstart;
select unix_timestamp() into @tend; select unix_timestamp() into @tend;
select @tend-@tstart <= 5;
@tend-@tstart <= 5
1
select * from t; select * from t;
a b a b
1 3 1 3
......
include/master-slave.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.
Warnings:
Note 1753 slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
[connection master] [connection master]
drop table if exists t; drop table if exists t;
create table t (a bigint not null, primary key(a)) engine=tokudb; create table t (a bigint not null, primary key(a)) engine=tokudb;
...@@ -11,9 +6,6 @@ select unix_timestamp() into @tstart; ...@@ -11,9 +6,6 @@ select unix_timestamp() into @tstart;
insert into t values (1); insert into t values (1);
insert into t values (2),(3); insert into t values (2),(3);
insert into t values (4); insert into t values (4);
select unix_timestamp()-@tstart <= 10;
unix_timestamp()-@tstart <= 10
1
include/diff_tables.inc [master:test.t, slave:test.t] include/diff_tables.inc [master:test.t, slave:test.t]
drop table if exists t; drop table if exists t;
include/rpl_end.inc include/rpl_end.inc
include/master-slave.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] [connection master]
use test; use test;
CREATE TABLE test.regular_tbl(id INT NOT NULL AUTO_INCREMENT, CREATE TABLE test.regular_tbl(id INT NOT NULL AUTO_INCREMENT,
...@@ -64,7 +61,7 @@ byrange_tbl CREATE TABLE `byrange_tbl` ( ...@@ -64,7 +61,7 @@ byrange_tbl CREATE TABLE `byrange_tbl` (
`fkid` int(11) DEFAULT NULL, `fkid` int(11) DEFAULT NULL,
`filler` varchar(255) DEFAULT NULL, `filler` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=TokuDB AUTO_INCREMENT=201 DEFAULT CHARSET=latin1 ) ENGINE=TokuDB AUTO_INCREMENT=201 DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
/*!50100 PARTITION BY RANGE (id) /*!50100 PARTITION BY RANGE (id)
(PARTITION pa100 VALUES LESS THAN (100) ENGINE = TokuDB, (PARTITION pa100 VALUES LESS THAN (100) ENGINE = TokuDB,
PARTITION paMax VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ PARTITION paMax VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */
...@@ -78,7 +75,7 @@ regular_tbl CREATE TABLE `regular_tbl` ( ...@@ -78,7 +75,7 @@ regular_tbl CREATE TABLE `regular_tbl` (
`fkid` int(11) DEFAULT NULL, `fkid` int(11) DEFAULT NULL,
`filler` varchar(255) DEFAULT NULL, `filler` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=TokuDB AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 ) ENGINE=TokuDB AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE test.byrange_tbl EXCHANGE PARTITION pa100 WITH TABLE test.regular_tbl; ALTER TABLE test.byrange_tbl EXCHANGE PARTITION pa100 WITH TABLE test.regular_tbl;
SELECT * FROM test.byrange_tbl ORDER BY fkid LIMIT 2; SELECT * FROM test.byrange_tbl ORDER BY fkid LIMIT 2;
id dt user uuidf fkid filler id dt user uuidf fkid filler
...@@ -106,7 +103,7 @@ byrange_tbl CREATE TABLE `byrange_tbl` ( ...@@ -106,7 +103,7 @@ byrange_tbl CREATE TABLE `byrange_tbl` (
`fkid` int(11) DEFAULT NULL, `fkid` int(11) DEFAULT NULL,
`filler` varchar(255) DEFAULT NULL, `filler` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=TokuDB AUTO_INCREMENT=201 DEFAULT CHARSET=latin1 ) ENGINE=TokuDB AUTO_INCREMENT=201 DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
/*!50100 PARTITION BY RANGE (id) /*!50100 PARTITION BY RANGE (id)
(PARTITION pa100 VALUES LESS THAN (100) ENGINE = TokuDB, (PARTITION pa100 VALUES LESS THAN (100) ENGINE = TokuDB,
PARTITION paMax VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */ PARTITION paMax VALUES LESS THAN MAXVALUE ENGINE = TokuDB) */
...@@ -120,7 +117,7 @@ regular_tbl CREATE TABLE `regular_tbl` ( ...@@ -120,7 +117,7 @@ regular_tbl CREATE TABLE `regular_tbl` (
`fkid` int(11) DEFAULT NULL, `fkid` int(11) DEFAULT NULL,
`filler` varchar(255) DEFAULT NULL, `filler` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=TokuDB AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 ) ENGINE=TokuDB AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SELECT count(*) "Slave norm" FROM test.regular_tbl; SELECT count(*) "Slave norm" FROM test.regular_tbl;
Slave norm Slave norm
99 99
......
include/master-slave.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] [connection master]
SHOW VARIABLES LIKE 'relay_log_space_limit'; SHOW VARIABLES LIKE 'relay_log_space_limit';
Variable_name Value Variable_name Value
...@@ -17,7 +14,6 @@ name age id ...@@ -17,7 +14,6 @@ name age id
Andy 31 00000001 Andy 31 00000001
Jacob 2 00000002 Jacob 2 00000002
Caleb 1 00000003 Caleb 1 00000003
include/sync_slave_sql_with_master.inc
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
name age id name age id
Andy 31 00000001 Andy 31 00000001
......
include/master-slave.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] [connection master]
CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'INNODB' ; CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'TokuDB' ;
SELECT * FROM t1; SELECT * FROM t1;
C1 C2 C1 C2
include/sync_slave_sql_with_master.inc
SELECT * FROM t1; SELECT * FROM t1;
C1 C2 C1 C2
INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X'); INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X');
...@@ -19,7 +15,6 @@ A C ...@@ -19,7 +15,6 @@ A C
X X X X
X Y X Y
X Z X Z
include/sync_slave_sql_with_master.inc
SELECT * FROM t1 ORDER BY C1,C2; SELECT * FROM t1 ORDER BY C1,C2;
C1 C2 C1 C2
A A A A
...@@ -35,7 +30,6 @@ A B ...@@ -35,7 +30,6 @@ A B
A C A C
X Y X Y
X Z X Z
include/sync_slave_sql_with_master.inc
SELECT * FROM t1 ORDER BY C1,C2; SELECT * FROM t1 ORDER BY C1,C2;
C1 C2 C1 C2
A B A B
...@@ -49,7 +43,6 @@ A B ...@@ -49,7 +43,6 @@ A B
A I A I
X Y X Y
X Z X Z
include/sync_slave_sql_with_master.inc
SELECT * FROM t1 ORDER BY C1,C2; SELECT * FROM t1 ORDER BY C1,C2;
C1 C2 C1 C2
A B A B
...@@ -67,14 +60,13 @@ A B ...@@ -67,14 +60,13 @@ A B
A I A I
X Y X Y
X Z X Z
include/sync_slave_sql_with_master.inc
SELECT * FROM t1 ORDER BY c1,c2; SELECT * FROM t1 ORDER BY c1,c2;
C1 C2 C1 C2
A B A B
A I A I
X Y X Y
X Z X Z
CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'INNODB' ; CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'TokuDB' ;
INSERT INTO t2 INSERT INTO t2
VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25), 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); (6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81);
...@@ -96,7 +88,6 @@ c1 c12 c2 ...@@ -96,7 +88,6 @@ c1 c12 c2
5 A 25 5 A 25
8 A 64 8 A 64
9 A 81 9 A 81
include/sync_slave_sql_with_master.inc
SELECT * FROM t2 ORDER BY c1,c2; SELECT * FROM t2 ORDER BY c1,c2;
c1 c12 c2 c1 c12 c2
1 A 2 1 A 2
...@@ -127,7 +118,6 @@ c1 c12 c2 ...@@ -127,7 +118,6 @@ c1 c12 c2
7 A 49 7 A 49
8 A 64 8 A 64
9 A 81 9 A 81
include/sync_slave_sql_with_master.inc
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
c1 c12 c2 c1 c12 c2
1 A 1 1 A 1
...@@ -151,7 +141,6 @@ c1 c12 c2 ...@@ -151,7 +141,6 @@ c1 c12 c2
7 A 49 7 A 49
8 A 64 8 A 64
9 A 81 9 A 81
include/sync_slave_sql_with_master.inc
SELECT * FROM t2 ORDER BY c1,c2; SELECT * FROM t2 ORDER BY c1,c2;
c1 c12 c2 c1 c12 c2
1 A 1 1 A 1
...@@ -173,7 +162,6 @@ c1 c12 c2 ...@@ -173,7 +162,6 @@ c1 c12 c2
6 A 36 6 A 36
7 A 49 7 A 49
9 A 81 9 A 81
include/sync_slave_sql_with_master.inc
SELECT * FROM t2 ORDER BY c1,c2; SELECT * FROM t2 ORDER BY c1,c2;
c1 c12 c2 c1 c12 c2
1 A 1 1 A 1
...@@ -184,7 +172,7 @@ c1 c12 c2 ...@@ -184,7 +172,7 @@ c1 c12 c2
7 A 49 7 A 49
9 A 81 9 A 81
UPDATE t2 SET c12='X'; 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 = 'INNODB' ; 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','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); 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; SELECT * FROM t3 ORDER BY C1,C2;
...@@ -195,7 +183,6 @@ A C 1 B 2 ...@@ -195,7 +183,6 @@ A C 1 B 2
X X 3 B 1 X X 3 B 1
X Y 2 B 1 X Y 2 B 1
X Z 2 B 2 X Z 2 B 2
include/sync_slave_sql_with_master.inc
SELECT * FROM t3 ORDER BY C1,C2; SELECT * FROM t3 ORDER BY C1,C2;
C1 C2 pk1 C3 pk2 C1 C2 pk1 C3 pk2
A A 3 B 2 A A 3 B 2
...@@ -211,7 +198,6 @@ A B 1 B 1 ...@@ -211,7 +198,6 @@ A B 1 B 1
A C 1 B 2 A C 1 B 2
X Y 2 B 1 X Y 2 B 1
X Z 2 B 2 X Z 2 B 2
include/sync_slave_sql_with_master.inc
SELECT * FROM t3 ORDER BY C1,C2; SELECT * FROM t3 ORDER BY C1,C2;
C1 C2 pk1 C3 pk2 C1 C2 pk1 C3 pk2
A B 1 B 1 A B 1 B 1
...@@ -225,14 +211,13 @@ A B 1 B 1 ...@@ -225,14 +211,13 @@ A B 1 B 1
A I 1 B 2 A I 1 B 2
X Y 2 B 1 X Y 2 B 1
X Z 2 B 2 X Z 2 B 2
include/sync_slave_sql_with_master.inc
SELECT * FROM t3 ORDER BY C1,C2; SELECT * FROM t3 ORDER BY C1,C2;
C1 C2 pk1 C3 pk2 C1 C2 pk1 C3 pk2
A B 1 B 1 A B 1 B 1
A I 1 B 2 A I 1 B 2
X Y 2 B 1 X Y 2 B 1
X Z 2 B 2 X Z 2 B 2
CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'INNODB' ; 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','B',1), ('X','Y',2), ('X','X',3);
INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6);
SELECT * FROM t6 ORDER BY C3; SELECT * FROM t6 ORDER BY C3;
...@@ -243,7 +228,6 @@ X X 3 ...@@ -243,7 +228,6 @@ X X 3
A C 4 A C 4
X Z 5 X Z 5
A A 6 A A 6
include/sync_slave_sql_with_master.inc
SELECT * FROM t6 ORDER BY C3; SELECT * FROM t6 ORDER BY C3;
C1 C2 C3 C1 C2 C3
A B 1 A B 1
...@@ -259,7 +243,6 @@ A B 1 ...@@ -259,7 +243,6 @@ A B 1
X Y 2 X Y 2
A C 4 A C 4
X Z 5 X Z 5
include/sync_slave_sql_with_master.inc
SELECT * FROM t6 ORDER BY C3; SELECT * FROM t6 ORDER BY C3;
C1 C2 C3 C1 C2 C3
A B 1 A B 1
...@@ -273,14 +256,13 @@ A B 1 ...@@ -273,14 +256,13 @@ A B 1
X Y 2 X Y 2
A I 4 A I 4
X Z 5 X Z 5
include/sync_slave_sql_with_master.inc
SELECT * FROM t6 ORDER BY C3; SELECT * FROM t6 ORDER BY C3;
C1 C2 C3 C1 C2 C3
A B 1 A B 1
X Y 2 X Y 2
A I 4 A I 4
X Z 5 X Z 5
CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'INNODB' ; 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','B',1), ('X','Y',2), ('X','X',3);
INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); 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; UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1;
...@@ -328,7 +310,6 @@ X Q 5 7 R 49 X Y 2 S 1 ...@@ -328,7 +310,6 @@ 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 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 Y 2 S 1
X Q 5 9 R 81 X Z 2 S 2 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; 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 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 Y 2 S 1
...@@ -375,18 +356,16 @@ X Q 5 9 R 81 X Y 2 S 1 ...@@ -375,18 +356,16 @@ X Q 5 9 R 81 X Y 2 S 1
X Q 5 9 R 81 X Z 2 S 2 X Q 5 9 R 81 X Z 2 S 2
SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS; SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY'; 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 = 'INNODB' ; 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; INSERT INTO t4 SET C1 = 1;
SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
C1 HEX(B1) HEX(B2) C1 HEX(B1) HEX(B2)
1 NULL 0 1 NULL 0
include/sync_slave_sql_with_master.inc
SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
C1 HEX(B1) HEX(B2) C1 HEX(B1) HEX(B2)
1 NULL 0 1 NULL 0
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'INNODB' ; CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'TokuDB' ;
include/sync_slave_sql_with_master.inc
--- on slave: original values --- --- on slave: original values ---
INSERT INTO t7 VALUES (1,3), (2,6), (3,9); INSERT INTO t7 VALUES (1,3), (2,6), (3,9);
SELECT * FROM t7 ORDER BY C1; SELECT * FROM t7 ORDER BY C1;
...@@ -402,7 +381,6 @@ C1 C2 ...@@ -402,7 +381,6 @@ C1 C2
1 2 1 2
2 4 2 4
3 6 3 6
include/sync_slave_sql_with_master.inc
set @@global.slave_exec_mode= default; set @@global.slave_exec_mode= default;
--- on slave: old values should be overwritten by replicated values --- --- on slave: old values should be overwritten by replicated values ---
SELECT * FROM t7 ORDER BY C1; SELECT * FROM t7 ORDER BY C1;
...@@ -411,7 +389,7 @@ C1 C2 ...@@ -411,7 +389,7 @@ C1 C2
2 4 2 4
3 6 3 6
--- on master --- --- on master ---
CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'INNODB' ; 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,99,99);
INSERT INTO t8 VALUES (99,22,33); INSERT INTO t8 VALUES (99,22,33);
ERROR 23000: Duplicate entry '99' for key 'PRIMARY' ERROR 23000: Duplicate entry '99' for key 'PRIMARY'
...@@ -422,7 +400,6 @@ ERROR 23000: Duplicate entry '99' for key 'c' ...@@ -422,7 +400,6 @@ ERROR 23000: Duplicate entry '99' for key 'c'
SELECT * FROM t8 ORDER BY a; SELECT * FROM t8 ORDER BY a;
a b c a b c
99 99 99 99 99 99
include/sync_slave_sql_with_master.inc
--- on slave --- --- on slave ---
SELECT * FROM t8 ORDER BY a; SELECT * FROM t8 ORDER BY a;
a b c a b c
...@@ -437,7 +414,6 @@ a b c ...@@ -437,7 +414,6 @@ a b c
set @@global.slave_exec_mode= 'IDEMPOTENT'; set @@global.slave_exec_mode= 'IDEMPOTENT';
--- on master --- --- on master ---
INSERT INTO t8 VALUES (2,4,8); INSERT INTO t8 VALUES (2,4,8);
include/sync_slave_sql_with_master.inc
set @@global.slave_exec_mode= default; set @@global.slave_exec_mode= default;
--- on slave --- --- on slave ---
SELECT * FROM t8 ORDER BY a; SELECT * FROM t8 ORDER BY a;
...@@ -449,18 +425,15 @@ a b c ...@@ -449,18 +425,15 @@ a b c
**** Test for BUG#31552 **** **** Test for BUG#31552 ****
**** On Master **** **** On Master ****
DELETE FROM t1; DELETE FROM t1;
include/sync_slave_sql_with_master.inc
include/rpl_reset.inc include/rpl_reset.inc
**** On Master **** **** On Master ****
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
**** On Master **** **** On Master ****
include/sync_slave_sql_with_master.inc
set @@global.slave_exec_mode= 'IDEMPOTENT'; set @@global.slave_exec_mode= 'IDEMPOTENT';
DELETE FROM t1 WHERE C1 = 'L'; DELETE FROM t1 WHERE C1 = 'L';
DELETE FROM t1; DELETE FROM t1;
SELECT COUNT(*) FROM t1 ORDER BY c1,c2; SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0 COUNT(*) 0
include/sync_slave_sql_with_master.inc
set @@global.slave_exec_mode= default; set @@global.slave_exec_mode= default;
include/check_slave_is_running.inc include/check_slave_is_running.inc
SELECT COUNT(*) FROM t1 ORDER BY c1,c2; SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
...@@ -472,90 +445,78 @@ CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE); ...@@ -472,90 +445,78 @@ CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE);
INSERT INTO t1 VALUES( INSERT INTO t1 VALUES(
'2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14'); '2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14');
**** On Slave **** **** On Slave ****
include/sync_slave_sql_with_master.inc
SELECT * FROM t1; SELECT * FROM t1;
a b c a b c
2005-11-14 01:01:01 2005-11-14 01:01:02 2005-11-14 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; 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, CREATE TABLE t1 (i INT NOT NULL,
c CHAR(16) CHARACTER SET utf8 NOT NULL, c CHAR(16) CHARACTER SET utf8 NOT NULL,
j INT NOT NULL) ENGINE = 'INNODB' ; j INT NOT NULL) ENGINE = 'TokuDB' ;
CREATE TABLE t2 (i INT NOT NULL, CREATE TABLE t2 (i INT NOT NULL,
c CHAR(16) CHARACTER SET utf8 NOT NULL, c CHAR(16) CHARACTER SET utf8 NOT NULL,
j INT NOT NULL) ENGINE = 'INNODB' ; 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; ALTER TABLE t2 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t3 (i INT NOT NULL, CREATE TABLE t3 (i INT NOT NULL,
c CHAR(128) CHARACTER SET utf8 NOT NULL, c CHAR(128) CHARACTER SET utf8 NOT NULL,
j INT NOT NULL) ENGINE = 'INNODB' ; 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; ALTER TABLE t3 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t4 (i INT NOT NULL, CREATE TABLE t4 (i INT NOT NULL,
c CHAR(128) CHARACTER SET utf8 NOT NULL, c CHAR(128) CHARACTER SET utf8 NOT NULL,
j INT NOT NULL) ENGINE = 'INNODB' ; j INT NOT NULL) ENGINE = 'TokuDB' ;
CREATE TABLE t5 (i INT NOT NULL, CREATE TABLE t5 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL, c CHAR(255) CHARACTER SET utf8 NOT NULL,
j INT NOT NULL) ENGINE = 'INNODB' ; 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; ALTER TABLE t5 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t6 (i INT NOT NULL, CREATE TABLE t6 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL, c CHAR(255) CHARACTER SET utf8 NOT NULL,
j INT NOT NULL) ENGINE = 'INNODB' ; 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; ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t7 (i INT NOT NULL, CREATE TABLE t7 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL, c CHAR(255) CHARACTER SET utf8 NOT NULL,
j INT NOT NULL) ENGINE = 'INNODB' ; j INT NOT NULL) ENGINE = 'TokuDB' ;
SET @saved_slave_type_conversions = @@slave_type_conversions; SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY'; SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
[expecting slave to replicate correctly] [expecting slave to replicate correctly]
INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (1, "", 1);
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); 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] include/diff_tables.inc [master:t1, slave:t1]
[expecting slave to replicate correctly] [expecting slave to replicate correctly]
INSERT INTO t2 VALUES (1, "", 1); INSERT INTO t2 VALUES (1, "", 1);
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); 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] include/diff_tables.inc [master:t2, slave:t2]
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions; 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.*Table definition on master and slave does not match: Column 1 size mismatch.* error.* 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.*Could not execute Delete_rows event on table test.t1.* error.* 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("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, error.* 1677");
call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
include/rpl_reset.inc include/rpl_reset.inc
[expecting slave to replicate correctly] [expecting slave to replicate correctly]
INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (1, "", 1);
INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); 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] include/diff_tables.inc [master:t4, slave:t4]
[expecting slave to stop] [expecting slave to stop]
INSERT INTO t5 VALUES (1, "", 1); INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2); INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
include/wait_for_slave_sql_error.inc [errno=1677] include/wait_for_slave_sql_error.inc [errno=1677]
Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)''
include/rpl_reset.inc include/rpl_reset.inc
[expecting slave to stop] [expecting slave to stop]
INSERT INTO t6 VALUES (1, "", 1); INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2); INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
include/wait_for_slave_sql_error.inc [errno=1677] include/wait_for_slave_sql_error.inc [errno=1677]
Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)''
include/rpl_reset.inc include/rpl_reset.inc
[expecting slave to replicate correctly] [expecting slave to replicate correctly]
INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (1, "", 1);
INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); 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] include/diff_tables.inc [master:t7, slave:t7]
drop table t1, t2, t3, t4, t5, t6, 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';
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='INNODB' ;
INSERT INTO t1 VALUES (1), (2), (3); INSERT INTO t1 VALUES (1), (2), (3);
UPDATE t1 SET a = 10; UPDATE t1 SET a = 10;
ERROR 23000: Duplicate entry '10' for key 'PRIMARY' ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
INSERT INTO t1 VALUES (4); INSERT INTO t1 VALUES (4);
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
drop table t1; drop table t1;
include/sync_slave_sql_with_master.inc
DROP TABLE IF EXISTS t1, t2; DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 ( CREATE TABLE t1 (
`pk` int(11) NOT NULL AUTO_INCREMENT, `pk` int(11) NOT NULL AUTO_INCREMENT,
...@@ -575,7 +536,7 @@ KEY `date_key` (`date_key`), ...@@ -575,7 +536,7 @@ KEY `date_key` (`date_key`),
KEY `time_key` (`time_key`), KEY `time_key` (`time_key`),
KEY `datetime_key` (`datetime_key`), KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`) KEY `varchar_key` (`varchar_key`)
) ENGINE='INNODB' ; ) 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'); 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 ( CREATE TABLE t2 (
`pk` int(11) NOT NULL AUTO_INCREMENT, `pk` int(11) NOT NULL AUTO_INCREMENT,
...@@ -595,7 +556,7 @@ KEY `date_key` (`date_key`), ...@@ -595,7 +556,7 @@ KEY `date_key` (`date_key`),
KEY `time_key` (`time_key`), KEY `time_key` (`time_key`),
KEY `datetime_key` (`datetime_key`), KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`) KEY `varchar_key` (`varchar_key`)
) ENGINE='INNODB' ; ) 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'); 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; DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
UPDATE t1 SET `int_key` = 3 ORDER BY `pk` LIMIT 4; UPDATE t1 SET `int_key` = 3 ORDER BY `pk` LIMIT 4;
...@@ -607,12 +568,11 @@ UPDATE t1 SET `pk` = 6 ORDER BY `int_key` LIMIT 6; ...@@ -607,12 +568,11 @@ UPDATE t1 SET `pk` = 6 ORDER BY `int_key` LIMIT 6;
ERROR 23000: Duplicate entry '6' for key 'PRIMARY' ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
DELETE FROM t2 WHERE `pk` < 7 LIMIT 1; DELETE FROM t2 WHERE `pk` < 7 LIMIT 1;
UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6;
include/sync_slave_sql_with_master.inc
*** results: t2 must be consistent **** *** results: t2 must be consistent ****
include/diff_tables.inc [master:t2, slave:t2] include/diff_tables.inc [master:t2, slave:t2]
DROP TABLE t1, t2; DROP TABLE t1, t2;
EOF OF TESTS EOF OF TESTS
CREATE TABLE t1 (a int) ENGINE='INNODB' ; CREATE TABLE t1 (a int) ENGINE='TokuDB';
INSERT IGNORE INTO t1 VALUES (NULL); INSERT IGNORE INTO t1 VALUES (NULL);
INSERT INTO t1 ( a ) VALUES ( 0 ); INSERT INTO t1 ( a ) VALUES ( 0 );
INSERT INTO t1 ( a ) VALUES ( 9 ); INSERT INTO t1 ( a ) VALUES ( 9 );
...@@ -625,13 +585,11 @@ UPDATE t1 SET a = 9 WHERE a < 3; ...@@ -625,13 +585,11 @@ UPDATE t1 SET a = 9 WHERE a < 3;
INSERT INTO t1 ( a ) VALUES ( 3 ); INSERT INTO t1 ( a ) VALUES ( 3 );
UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 0 WHERE a < 4;
UPDATE t1 SET a = 8 WHERE a < 5; UPDATE t1 SET a = 8 WHERE a < 5;
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
drop table t1; drop table t1;
include/sync_slave_sql_with_master.inc
SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS; SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY'; SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY';
CREATE TABLE t1 (a bit) ENGINE='INNODB' ; CREATE TABLE t1 (a bit) ENGINE='TokuDB';
INSERT IGNORE INTO t1 VALUES (NULL); INSERT IGNORE INTO t1 VALUES (NULL);
INSERT INTO t1 ( a ) VALUES ( 0 ); INSERT INTO t1 ( a ) VALUES ( 0 );
UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3; UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3;
...@@ -671,9 +629,7 @@ DELETE FROM t1 WHERE a < 3 LIMIT 0; ...@@ -671,9 +629,7 @@ DELETE FROM t1 WHERE a < 3 LIMIT 0;
UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2;
INSERT INTO t1 ( a ) VALUES ( 1 ); INSERT INTO t1 ( a ) VALUES ( 1 );
UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; 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; SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
drop table t1; drop table t1;
include/sync_slave_sql_with_master.inc
include/rpl_end.inc include/rpl_end.inc
include/master-slave.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] [connection master]
DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t2;
...@@ -27,7 +24,6 @@ LENGTH(data) ...@@ -27,7 +24,6 @@ LENGTH(data)
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3;
LENGTH(data) LENGTH(data)
16384 16384
include/sync_slave_sql_with_master.inc
**** Data Insert Validation Slave Section test.t1 **** **** Data Insert Validation Slave Section test.t1 ****
...@@ -54,7 +50,6 @@ LENGTH(data) ...@@ -54,7 +50,6 @@ LENGTH(data)
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2;
LENGTH(data) LENGTH(data)
17408 17408
include/sync_slave_sql_with_master.inc
**** Data Update Validation Slave Section test.t1 **** **** Data Update Validation Slave Section test.t1 ****
...@@ -114,7 +109,6 @@ SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) ...@@ -114,7 +109,6 @@ SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM test.t2 WHERE c1=2; FROM test.t2 WHERE c1=2;
c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3)
2 20000 b2 30000 dd2 2 20000 b2 30000 dd2
include/sync_slave_sql_with_master.inc
**** Data Insert Validation Slave Section test.t2 **** **** Data Insert Validation Slave Section test.t2 ****
...@@ -142,7 +136,6 @@ SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) ...@@ -142,7 +136,6 @@ SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM test.t2 WHERE c1=2; FROM test.t2 WHERE c1=2;
c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3)
2 2256 b1 3000 dd1 2 2256 b1 3000 dd1
include/sync_slave_sql_with_master.inc
**** Data Update Validation Slave Section test.t2 **** **** Data Update Validation Slave Section test.t2 ****
...@@ -157,5 +150,4 @@ c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) ...@@ -157,5 +150,4 @@ c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3)
DROP TABLE IF EXISTS test.t1; DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2; DROP TABLE IF EXISTS test.t2;
include/sync_slave_sql_with_master.inc
include/rpl_end.inc include/rpl_end.inc
include/master-slave.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] [connection master]
include/sync_slave_sql_with_master.inc
include/stop_slave.inc include/stop_slave.inc
include/wait_for_slave_to_stop.inc include/wait_for_slave_to_stop.inc
reset master; reset master;
reset slave; reset slave;
start slave; start slave;
include/wait_for_slave_to_start.inc 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; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB;
insert into t1 values (NULL); insert into t1 values (NULL);
drop table t1; drop table t1;
...@@ -20,25 +18,34 @@ count(*) ...@@ -20,25 +18,34 @@ count(*)
69 69
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info 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 # # 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 # 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 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ 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 # # 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 # 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 # Xid # # COMMIT /* XID */
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info 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 # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=TokuDB
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info 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 # 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 # Xid # # COMMIT /* XID */
flush logs; flush logs;
create table t3 (a int)ENGINE=TokuDB; create table t3 (a int)ENGINE=TokuDB;
...@@ -113,7 +120,6 @@ Aberdeen ...@@ -113,7 +120,6 @@ Aberdeen
Abernathy Abernathy
aberrant aberrant
aberration aberration
include/sync_slave_sql_with_master.inc
select * from t1 order by 1 asc; select * from t1 order by 1 asc;
word word
Aarhus Aarhus
...@@ -192,56 +198,67 @@ create table t2 (n int)ENGINE=TokuDB; ...@@ -192,56 +198,67 @@ create table t2 (n int)ENGINE=TokuDB;
insert into t2 values (1); insert into t2 values (1);
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info 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 # # 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 # 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 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ 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 # # 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 # 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 # Xid # # COMMIT /* XID */
master-bin.000001 # Rotate # # master-bin.000002;pos=POS master-bin.000001 # Rotate # # master-bin.000002;pos=POS
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info 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 # 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 # # 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 # 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 */ master-bin.000002 # Xid # # COMMIT /* XID */
show binary logs; show binary logs;
Log_name File_size Log_name File_size
master-bin.000001 # master-bin.000001 #
master-bin.000002 # master-bin.000002 #
include/sync_slave_sql_with_master.inc
show binary logs; show binary logs;
Log_name File_size Log_name File_size
slave-bin.000001 # slave-bin.000001 #
slave-bin.000002 # slave-bin.000002 #
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info 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 # # 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 # 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 # Xid # # COMMIT /* XID */
slave-bin.000001 # Gtid # # GTID #-#-#
slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ 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 # # 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 # 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 # Xid # # COMMIT /* XID */
slave-bin.000001 # Gtid # # GTID #-#-#
slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=TokuDB slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=TokuDB
slave-bin.000001 # Rotate # # slave-bin.000002;pos=POS slave-bin.000001 # Rotate # # slave-bin.000002;pos=POS
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info 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 # # 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 # 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 */ slave-bin.000002 # Xid # # COMMIT /* XID */
include/check_slave_is_running.inc include/check_slave_is_running.inc
show binlog events in 'slave-bin.000005' from 4; show binlog events in 'slave-bin.000005' from 4;
...@@ -256,14 +273,15 @@ set insert_id=5; ...@@ -256,14 +273,15 @@ set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info 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 # # 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 # 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 # # COMMIT
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Table_map # # table_id: # (test.t1) 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 # # COMMIT
select * from t1; select * from t1;
a b a b
...@@ -271,5 +289,5 @@ a b ...@@ -271,5 +289,5 @@ a b
5 1 5 1
6 1 6 1
drop table t1; 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/rpl_end.inc
include/master-slave.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] [connection master]
## case #1 - last_null_bit_pos==0 in record_compare without X bit ## case #1 - last_null_bit_pos==0 in record_compare without X bit
include/rpl_reset.inc include/rpl_reset.inc
...@@ -9,10 +6,8 @@ CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) ...@@ -9,10 +6,8 @@ CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20)
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
UPDATE t1 SET c5 = 'a'; UPDATE t1 SET c5 = 'a';
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1; DROP TABLE t1;
include/sync_slave_sql_with_master.inc
## case #1.1 - last_null_bit_pos==0 in record_compare with X bit ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit
## (1 column less and no varchar) ## (1 column less and no varchar)
include/rpl_reset.inc include/rpl_reset.inc
...@@ -20,18 +15,14 @@ CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) ...@@ -20,18 +15,14 @@ CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20)
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
UPDATE t1 SET c5 = 'a'; UPDATE t1 SET c5 = 'a';
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1; DROP TABLE t1;
include/sync_slave_sql_with_master.inc
## case #2 - X bit is wrongly set. ## case #2 - X bit is wrongly set.
include/rpl_reset.inc include/rpl_reset.inc
CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=TokuDB DEFAULT CHARSET= latin1; CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=TokuDB DEFAULT CHARSET= latin1;
INSERT INTO t1(c1) VALUES (10); INSERT INTO t1(c1) VALUES (10);
INSERT INTO t1(c1) VALUES (NULL); INSERT INTO t1(c1) VALUES (NULL);
UPDATE t1 SET c1= 0; UPDATE t1 SET c1= 0;
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1; DROP TABLE t1;
include/sync_slave_sql_with_master.inc
include/rpl_end.inc include/rpl_end.inc
include/master-slave.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] [connection master]
CREATE PROCEDURE test.p1(IN i INT) CREATE PROCEDURE test.p1(IN i INT)
BEGIN BEGIN
...@@ -25,7 +22,6 @@ num ...@@ -25,7 +22,6 @@ num
< ---- Slave selects-- > < ---- Slave selects-- >
------------------------ ------------------------
include/sync_slave_sql_with_master.inc
SELECT * FROM test.t1; SELECT * FROM test.t1;
num num
12 12
...@@ -39,7 +35,6 @@ num ...@@ -39,7 +35,6 @@ num
< ---- Slave selects-- > < ---- Slave selects-- >
------------------------ ------------------------
include/sync_slave_sql_with_master.inc
SELECT * FROM test.t1; SELECT * FROM test.t1;
num num
13 13
......
include/master-slave.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] [connection master]
STOP SLAVE; STOP SLAVE;
SET @my_sql_mode= @@global.sql_mode; SET @my_sql_mode= @@global.sql_mode;
...@@ -120,16 +117,18 @@ a ...@@ -120,16 +117,18 @@ a
include/check_slave_is_running.inc include/check_slave_is_running.inc
INSERT INTO t9 VALUES (4); INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4); INSERT INTO t4 VALUES (4);
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535"); call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* error.* 1535");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* Error_code: 1677"); call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* error.* 1677");
call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float''
INSERT INTO t9 VALUES (5); INSERT INTO t9 VALUES (5);
INSERT INTO t5 VALUES (5,10,25); INSERT INTO t5 VALUES (5,10,25);
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'int' to type 'float''
INSERT INTO t9 VALUES (6); INSERT INTO t9 VALUES (6);
INSERT INTO t6 VALUES (6,12,36); INSERT INTO t6 VALUES (6,12,36);
include/wait_for_slave_sql_error_and_skip.inc [errno=1677] include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 2 of table 'test.t6' cannot be converted from type 'int' to type 'float''
INSERT INTO t9 VALUES (6); INSERT INTO t9 VALUES (6);
include/check_slave_is_running.inc include/check_slave_is_running.inc
INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t7 VALUES (1),(2),(3);
......
include/master-slave.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] [connection master]
include/rpl_reset.inc include/rpl_reset.inc
CREATE TABLE t1 (c1 BIT, c2 INT) Engine=TokuDB; CREATE TABLE t1 (c1 BIT, c2 INT) Engine=TokuDB;
INSERT INTO `t1` VALUES ( 1, 1 ); INSERT INTO `t1` VALUES ( 1, 1 );
UPDATE t1 SET c1=NULL where c2=1; UPDATE t1 SET c1=NULL where c2=1;
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
DELETE FROM t1 WHERE c2=1 LIMIT 1; DELETE FROM t1 WHERE c2=1 LIMIT 1;
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1; DROP TABLE t1;
include/sync_slave_sql_with_master.inc
include/rpl_reset.inc include/rpl_reset.inc
CREATE TABLE t1 (c1 CHAR) Engine=TokuDB; CREATE TABLE t1 (c1 CHAR) Engine=TokuDB;
INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ; INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ;
...@@ -21,11 +15,8 @@ SELECT * FROM t1; ...@@ -21,11 +15,8 @@ SELECT * FROM t1;
c1 c1
w w
UPDATE t1 SET c1=NULL WHERE c1='w'; UPDATE t1 SET c1=NULL WHERE c1='w';
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
DELETE FROM t1 LIMIT 2; DELETE FROM t1 LIMIT 2;
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1; DROP TABLE t1;
include/sync_slave_sql_with_master.inc
include/rpl_end.inc include/rpl_end.inc
include/master-slave.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] [connection master]
CREATE TABLE t4 ( CREATE TABLE t4 (
id INT(5) unsigned NOT NULL auto_increment, id INT(5) unsigned NOT NULL auto_increment,
...@@ -47,13 +44,11 @@ SHOW CREATE TABLE mysqltest1.t1; ...@@ -47,13 +44,11 @@ SHOW CREATE TABLE mysqltest1.t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`f1` bigint(20) DEFAULT NULL `f1` bigint(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /* `compression`='tokudb_zlib' */
-------- switch to master -------- -------- switch to master --------
INSERT INTO mysqltest1.t1 SET f1= 1; INSERT INTO mysqltest1.t1 SET f1= 1;
DROP TEMPORARY TABLE mysqltest1.tmp; DROP TEMPORARY TABLE mysqltest1.tmp;
ROLLBACK; ROLLBACK;
Warnings:
Warning # Some temporary tables were dropped, but these operations could not be rolled back.
SHOW CREATE TABLE mysqltest1.tmp; SHOW CREATE TABLE mysqltest1.tmp;
ERROR 42S02: Table 'mysqltest1.tmp' doesn't exist ERROR 42S02: Table 'mysqltest1.tmp' doesn't exist
######### Must return no rows here ######### ######### Must return no rows here #########
...@@ -63,8 +58,6 @@ COUNT(*) ...@@ -63,8 +58,6 @@ COUNT(*)
INSERT INTO mysqltest1.t1 SET f1= 2; INSERT INTO mysqltest1.t1 SET f1= 2;
CREATE TEMPORARY TABLE mysqltest1.tmp2(a INT) ENGINE=InnoDB; CREATE TEMPORARY TABLE mysqltest1.tmp2(a INT) ENGINE=InnoDB;
ROLLBACK; ROLLBACK;
Warnings:
Warning # The creation of some temporary tables could not be rolled back.
SHOW CREATE TABLE mysqltest1.tmp2; SHOW CREATE TABLE mysqltest1.tmp2;
Table Create Table Table Create Table
tmp2 CREATE TEMPORARY TABLE `tmp2` ( tmp2 CREATE TEMPORARY TABLE `tmp2` (
...@@ -79,8 +72,7 @@ SHOW CREATE TABLE mysqltest1.tmp; ...@@ -79,8 +72,7 @@ SHOW CREATE TABLE mysqltest1.tmp;
ERROR 42S02: Table 'mysqltest1.tmp' doesn't exist ERROR 42S02: Table 'mysqltest1.tmp' doesn't exist
SHOW CREATE TABLE mysqltest1.tmp2; SHOW CREATE TABLE mysqltest1.tmp2;
ERROR 42S02: Table 'mysqltest1.tmp2' doesn't exist ERROR 42S02: Table 'mysqltest1.tmp2' doesn't exist
######### for SBR, t1 has two rows here: the transaction not rolled back since t1 uses MyISAM ######### ######### t1 has two rows here: the transaction not rolled back since t1 uses MyISAM #########
######### for MBR, t1 has one row here: the transaction not rolled back since t1 uses MyISAM #########
SELECT COUNT(*) FROM mysqltest1.t1; SELECT COUNT(*) FROM mysqltest1.t1;
COUNT(*) COUNT(*)
2 2
......
include/master-slave.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] [connection master]
use test; use test;
CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
...@@ -115,7 +112,7 @@ Create Table CREATE TABLE `byrange_tbl` ( ...@@ -115,7 +112,7 @@ Create Table CREATE TABLE `byrange_tbl` (
`fkid` mediumint(9) DEFAULT NULL, `fkid` mediumint(9) DEFAULT NULL,
`filler` varchar(255) DEFAULT NULL, `filler` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=TokuDB AUTO_INCREMENT=1001 DEFAULT CHARSET=latin1 ) ENGINE=TokuDB AUTO_INCREMENT=1001 DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
/*!50100 PARTITION BY RANGE (id) /*!50100 PARTITION BY RANGE (id)
SUBPARTITION BY HASH (id) SUBPARTITION BY HASH (id)
SUBPARTITIONS 2 SUBPARTITIONS 2
......
include/master-slave.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] [connection master]
use test; use test;
CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT, CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
......
include/master-slave.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] [connection master]
==========MASTER========== ==========MASTER==========
show global variables like 'binlog_format%'; show global variables like 'binlog_format%';
...@@ -58,7 +55,7 @@ t1 CREATE TABLE `t1` ( ...@@ -58,7 +55,7 @@ t1 CREATE TABLE `t1` (
`b` char(254) DEFAULT NULL, `b` char(254) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `index1` (`b`) KEY `index1` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
...@@ -66,7 +63,7 @@ t2 CREATE TABLE `t2` ( ...@@ -66,7 +63,7 @@ t2 CREATE TABLE `t2` (
`b` char(254) DEFAULT NULL, `b` char(254) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `index1` (`b`) KEY `index1` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
...@@ -76,7 +73,7 @@ t1 CREATE TABLE `t1` ( ...@@ -76,7 +73,7 @@ t1 CREATE TABLE `t1` (
`b` char(254) DEFAULT NULL, `b` char(254) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `index1` (`b`) KEY `index1` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
...@@ -84,7 +81,7 @@ t2 CREATE TABLE `t2` ( ...@@ -84,7 +81,7 @@ t2 CREATE TABLE `t2` (
`b` char(254) DEFAULT NULL, `b` char(254) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `index1` (`b`) KEY `index1` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
******************** DDL for indexes ******************** ******************** DDL for indexes ********************
ALTER TABLE t2 ADD COLUMN d datetime; ALTER TABLE t2 ADD COLUMN d datetime;
...@@ -98,7 +95,7 @@ t1 CREATE TABLE `t1` ( ...@@ -98,7 +95,7 @@ t1 CREATE TABLE `t1` (
`b` char(254) DEFAULT NULL, `b` char(254) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `index1` (`b`) KEY `index1` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
...@@ -109,7 +106,7 @@ t2 CREATE TABLE `t2` ( ...@@ -109,7 +106,7 @@ t2 CREATE TABLE `t2` (
KEY `index1` (`b`), KEY `index1` (`b`),
KEY `index2` (`d`), KEY `index2` (`d`),
KEY `index3` (`a`,`d`) KEY `index3` (`a`,`d`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
...@@ -119,7 +116,7 @@ t1 CREATE TABLE `t1` ( ...@@ -119,7 +116,7 @@ t1 CREATE TABLE `t1` (
`b` char(254) DEFAULT NULL, `b` char(254) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `index1` (`b`) KEY `index1` (`b`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
...@@ -130,30 +127,48 @@ t2 CREATE TABLE `t2` ( ...@@ -130,30 +127,48 @@ t2 CREATE TABLE `t2` (
KEY `index1` (`b`), KEY `index1` (`b`),
KEY `index2` (`d`), KEY `index2` (`d`),
KEY `index3` (`a`,`d`) KEY `index3` (`a`,`d`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1 ) ENGINE=TokuDB DEFAULT CHARSET=latin1 `compression`='tokudb_zlib'
ALTER TABLE t2 DROP COLUMN d; ALTER TABLE t2 DROP COLUMN d;
******************** SHOW BINLOG EVENTS ******************** ******************** SHOW BINLOG EVENTS ********************
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP DATABASE IF EXISTS test_rpl master-bin.000001 # Query # # DROP DATABASE IF EXISTS test_rpl
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP DATABASE IF EXISTS test_rpl_1 master-bin.000001 # Query # # DROP DATABASE IF EXISTS test_rpl_1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # CREATE DATABASE test_rpl_1 CHARACTER SET utf8 COLLATE utf8_general_ci master-bin.000001 # Query # # CREATE DATABASE test_rpl_1 CHARACTER SET utf8 COLLATE utf8_general_ci
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # ALTER DATABASE test_rpl_1 CHARACTER SET latin1 COLLATE latin1_general_ci master-bin.000001 # Query # # ALTER DATABASE test_rpl_1 CHARACTER SET latin1 COLLATE latin1_general_ci
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP DATABASE test_rpl_1 master-bin.000001 # Query # # DROP DATABASE test_rpl_1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # CREATE DATABASE test_rpl CHARACTER SET utf8 COLLATE utf8_general_ci master-bin.000001 # Query # # CREATE DATABASE test_rpl CHARACTER SET utf8 COLLATE utf8_general_ci
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # ALTER DATABASE test_rpl CHARACTER SET latin1 COLLATE latin1_swedish_ci master-bin.000001 # Query # # ALTER DATABASE test_rpl CHARACTER SET latin1 COLLATE latin1_swedish_ci
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t0 (a int auto_increment not null, c int not null, PRIMARY KEY(a), KEY index2 (c)) ENGINE=TokuDB master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t0 (a int auto_increment not null, c int not null, PRIMARY KEY(a), KEY index2 (c)) ENGINE=TokuDB
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 DROP INDEX index2 master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 DROP INDEX index2
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 ADD COLUMN b char(254) master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 ADD COLUMN b char(254)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 ADD INDEX index1 (b) master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 ADD INDEX index1 (b)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 DROP COLUMN c master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 DROP COLUMN c
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; RENAME TABLE t0 TO t1 master-bin.000001 # Query # # use `test_rpl`; RENAME TABLE t0 TO t1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t2 LIKE t1 master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t2 LIKE t1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t2 ADD COLUMN d datetime master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t2 ADD COLUMN d datetime
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index2 on t2 (d) master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index2 on t2 (d)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index3 on t2 (a, d) master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index3 on t2 (a, d)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t2 DROP COLUMN d master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t2 DROP COLUMN d
drop database test_rpl; drop database test_rpl;
include/rpl_end.inc include/rpl_end.inc
include/master-slave.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] [connection master]
==========MASTER========== ==========MASTER==========
show global variables like 'binlog_format%'; show global variables like 'binlog_format%';
...@@ -831,275 +828,304 @@ DELETE FROM t2; ...@@ -831,275 +828,304 @@ DELETE FROM t2;
******************** SHOW BINLOG EVENTS ******************** ******************** SHOW BINLOG EVENTS ********************
include/show_binlog_events.inc include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # CREATE DATABASE test_rpl master-bin.000001 # Query # # CREATE DATABASE test_rpl
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t1 (a int auto_increment not null, b char(254), PRIMARY KEY(a)) ENGINE=TokuDB master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t1 (a int auto_increment not null, b char(254), PRIMARY KEY(a)) ENGINE=TokuDB
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t2 (a int auto_increment not null, b char(254), PRIMARY KEY(a)) ENGINE=TokuDB master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t2 (a int auto_increment not null, b char(254), PRIMARY KEY(a)) ENGINE=TokuDB
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(2, 't1, text 2') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(2, 't1, text 2')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Table_map # # table_id: # (test_rpl.t2) master-bin.000001 # Table_map # # table_id: # (test_rpl.t2)
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Table_map # # table_id: # (test_rpl.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 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Table_map # # table_id: # (test_rpl.t2) master-bin.000001 # Table_map # # table_id: # (test_rpl.t2)
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 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES (1, 't1, text 1') ON DUPLICATE KEY UPDATE b = 't2, text 1' master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES (1, 't1, text 1') ON DUPLICATE KEY UPDATE b = 't2, text 1'
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 WHERE a = 2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 WHERE a = 2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Table_map # # table_id: # (test_rpl.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 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(2, 't1, text 2') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(2, 't1, text 2')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(3, 't1, text 3') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(3, 't1, text 3')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; REPLACE INTO t1 VALUES(1, 't1, text 11') master-bin.000001 # Query # # use `test_rpl`; REPLACE INTO t1 VALUES(1, 't1, text 11')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; REPLACE INTO t1 SET a=3, b='t1, text 33' master-bin.000001 # Query # # use `test_rpl`; REPLACE INTO t1 SET a=3, b='t1, text 33'
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 'CCC') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 'CCC')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(2, 'DDD') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(2, 'DDD')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(1, 'DDD') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(1, 'DDD')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(2, 'CCC') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(2, 'CCC')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; TRUNCATE t1 master-bin.000001 # Query # # use `test_rpl`; TRUNCATE t1
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; UPDATE t1 SET b = 't1, text 1 updated' WHERE a = 1 master-bin.000001 # Query # # use `test_rpl`; UPDATE t1 SET b = 't1, text 1 updated' WHERE a = 1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; UPDATE t1, t2 SET t1.b = 'test', t2.b = 'test' master-bin.000001 # Query # # use `test_rpl`; UPDATE t1, t2 SET t1.b = 'test', t2.b = 'test'
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (1, 'start') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (1, 'start')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (3, 'before savepoint s1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (3, 'before savepoint s1')
master-bin.000001 # Query # # SAVEPOINT `s1` master-bin.000001 # Query # # SAVEPOINT `s1`
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (5, 'before savepoint s2') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (5, 'before savepoint s2')
master-bin.000001 # Query # # SAVEPOINT `s2` master-bin.000001 # Query # # SAVEPOINT `s2`
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (6, 'after savepoint s2') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (6, 'after savepoint s2')
master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Table_map # # table_id: # (test_rpl.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 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 7 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 7
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE USER 'user_test_rpl'@'localhost' IDENTIFIED BY PASSWORD '*1111111111111111111111111111111111111111' master-bin.000001 # Query # # use `test_rpl`; CREATE USER 'user_test_rpl'@'localhost' IDENTIFIED BY PASSWORD '*1111111111111111111111111111111111111111'
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; GRANT SELECT ON *.* TO 'user_test_rpl'@'localhost' master-bin.000001 # Query # # use `test_rpl`; GRANT SELECT ON *.* TO 'user_test_rpl'@'localhost'
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; REVOKE SELECT ON *.* FROM 'user_test_rpl'@'localhost' master-bin.000001 # Query # # use `test_rpl`; REVOKE SELECT ON *.* FROM 'user_test_rpl'@'localhost'
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; SET PASSWORD FOR 'user_test_rpl'@'localhost'='*0000000000000000000000000000000000000000' master-bin.000001 # Query # # use `test_rpl`; SET PASSWORD FOR 'user_test_rpl'@'localhost'='*0000000000000000000000000000000000000000'
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; RENAME USER 'user_test_rpl'@'localhost' TO 'user_test_rpl_2'@'localhost' master-bin.000001 # Query # # use `test_rpl`; RENAME USER 'user_test_rpl'@'localhost' TO 'user_test_rpl_2'@'localhost'
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DROP USER 'user_test_rpl_2'@'localhost' master-bin.000001 # Query # # use `test_rpl`; DROP USER 'user_test_rpl_2'@'localhost'
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(100, 'test') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(100, 'test')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; ANALYZE TABLE t1 master-bin.000001 # Query # # use `test_rpl`; ANALYZE TABLE t1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; OPTIMIZE TABLE t1 master-bin.000001 # Query # # use `test_rpl`; OPTIMIZE TABLE t1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; REPAIR TABLE t1 master-bin.000001 # Query # # use `test_rpl`; REPAIR TABLE t1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
BEGIN BEGIN
UPDATE t1 SET b = 'test' WHERE a = 201; UPDATE t1 SET b = 'test' WHERE a = 201;
END END
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`() master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`()
BEGIN BEGIN
UPDATE t1 SET b = UUID() WHERE a = 202; UPDATE t1 SET b = UUID() WHERE a = 202;
END END
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(201, 'test 201') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(201, 'test 201')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; UPDATE t1 SET b = 'test' WHERE a = 201 master-bin.000001 # Query # # use `test_rpl`; UPDATE t1 SET b = 'test' WHERE a = 201
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(202, 'test 202') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(202, 'test 202')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 202 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 202
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; ALTER PROCEDURE p1 COMMENT 'p1' master-bin.000001 # Query # # use `test_rpl`; ALTER PROCEDURE p1 COMMENT 'p1'
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DROP PROCEDURE p1 master-bin.000001 # Query # # use `test_rpl`; DROP PROCEDURE p1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DROP PROCEDURE p2 master-bin.000001 # Query # # use `test_rpl`; DROP PROCEDURE p2
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON t1 master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON t1
FOR EACH ROW BEGIN FOR EACH ROW BEGIN
INSERT INTO t2 SET a = NEW.a, b = NEW.b; INSERT INTO t2 SET a = NEW.a, b = NEW.b;
END END
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Table_map # # table_id: # (test_rpl.t1) master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
master-bin.000001 # Table_map # # table_id: # (test_rpl.t2) master-bin.000001 # Table_map # # table_id: # (test_rpl.t2)
master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows_v1 # # table_id: #
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 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DROP TRIGGER tr1 master-bin.000001 # Query # # use `test_rpl`; DROP TRIGGER tr1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; GRANT EVENT ON *.* TO 'root'@'localhost' master-bin.000001 # Query # # use `test_rpl`; GRANT EVENT ON *.* TO 'root'@'localhost'
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; ALTER EVENT e1 RENAME TO e2 master-bin.000001 # Query # # use `test_rpl`; ALTER EVENT e1 RENAME TO e2
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DROP EVENT e2 master-bin.000001 # Query # # use `test_rpl`; DROP EVENT e2
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(2, 'test2') master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(2, 'test2')
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS SELECT * FROM t1 WHERE a = 1 master-bin.000001 # Query # # use `test_rpl`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS SELECT * FROM t1 WHERE a = 1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS SELECT * FROM t1 WHERE b <> UUID() master-bin.000001 # Query # # use `test_rpl`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS SELECT * FROM t1 WHERE b <> UUID()
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS SELECT * FROM t1 WHERE a = 2 master-bin.000001 # Query # # use `test_rpl`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS SELECT * FROM t1 WHERE a = 2
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DROP VIEW v1 master-bin.000001 # Query # # use `test_rpl`; DROP VIEW v1
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DROP VIEW v2 master-bin.000001 # Query # # use `test_rpl`; DROP VIEW v2
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Xid # # COMMIT /* XID */
drop database test_rpl; drop database test_rpl;
......
include/master-slave.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] [connection master]
drop table if exists t; drop table if exists t;
create table t (a bigint not null, primary key(a)) engine=tokudb; create table t (a bigint not null, primary key(a)) engine=tokudb;
......
include/master-slave.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] [connection master]
include/rpl_reset.inc include/rpl_reset.inc
**** On Master **** **** On Master ****
CREATE TABLE t1 (a INT, b LONG) ENGINE=TokuDB; CREATE TABLE t1 (a INT, b LONG) ENGINE=TokuDB;
INSERT INTO t1 VALUES (1,1), (2,2); INSERT INTO t1 VALUES (1,1), (2,2);
include/sync_slave_sql_with_master.inc
**** On Master **** **** On Master ****
TRUNCATE TABLE t1; TRUNCATE TABLE t1;
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
==== Test using a table with delete triggers ==== ==== Test using a table with delete triggers ====
**** On Master **** **** On Master ****
SET @count := 1; SET @count := 1;
CREATE TABLE t2 (a INT, b LONG) ENGINE=TokuDB; CREATE TABLE t2 (a INT, b LONG) ENGINE=TokuDB;
CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1;
include/sync_slave_sql_with_master.inc
**** On Master **** **** On Master ****
TRUNCATE TABLE t1; TRUNCATE TABLE t1;
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t2, slave:t2] include/diff_tables.inc [master:t2, slave:t2]
DROP TABLE t1,t2; DROP TABLE t1,t2;
include/sync_slave_sql_with_master.inc
include/rpl_reset.inc include/rpl_reset.inc
**** On Master **** **** On Master ****
CREATE TABLE t1 (a INT, b LONG) ENGINE=TokuDB; CREATE TABLE t1 (a INT, b LONG) ENGINE=TokuDB;
INSERT INTO t1 VALUES (1,1), (2,2); INSERT INTO t1 VALUES (1,1), (2,2);
include/sync_slave_sql_with_master.inc
**** On Master **** **** On Master ****
DELETE FROM t1; DELETE FROM t1;
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
==== Test using a table with delete triggers ==== ==== Test using a table with delete triggers ====
**** On Master **** **** On Master ****
SET @count := 1; SET @count := 1;
CREATE TABLE t2 (a INT, b LONG) ENGINE=TokuDB; CREATE TABLE t2 (a INT, b LONG) ENGINE=TokuDB;
CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1;
include/sync_slave_sql_with_master.inc
**** On Master **** **** On Master ****
DELETE FROM t1; DELETE FROM t1;
include/sync_slave_sql_with_master.inc
include/diff_tables.inc [master:t2, slave:t2] include/diff_tables.inc [master:t2, slave:t2]
DROP TABLE t1,t2; DROP TABLE t1,t2;
include/sync_slave_sql_with_master.inc
include/rpl_end.inc include/rpl_end.inc
include/master-slave.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] [connection master]
SET @saved_slave_type_conversions = @@GLOBAL.SLAVE_TYPE_CONVERSIONS; SET @saved_slave_type_conversions = @@GLOBAL.SLAVE_TYPE_CONVERSIONS;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = ''; SET GLOBAL SLAVE_TYPE_CONVERSIONS = '';
......
include/master-slave.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] [connection master]
CREATE TABLE t1(`a` INT) ENGINE=TokuDB; CREATE TABLE t1(`a` INT) ENGINE=TokuDB;
CREATE TABLE t2(`a` INT) ENGINE=InnoDB; CREATE TABLE t2(`a` INT) ENGINE=InnoDB;
......
-- source include/not_ndb_default.inc
-- source include/have_tokudb.inc -- source include/have_tokudb.inc
-- source include/not_mts_slave_parallel_workers.inc
-- source include/not_relay_log_info_table.inc
-- source include/not_master_info_table.inc
let $engine_type=TokuDB; let $engine_type=TokuDB;
-- source extra/rpl_tests/rpl_deadlock.test -- source extra/rpl_tests/rpl_deadlock.test
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
--source include/have_tokudb.inc --source include/have_tokudb.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
let $engine=Innodb; let $engine=TokuDB;
--source extra/rpl_tests/rpl_not_null.test --source extra/rpl_tests/rpl_not_null.test
--source include/rpl_end.inc --source include/rpl_end.inc
--read-only=ON --tokudb-rpl-unique-checks-delay=10000 --tokudb-rpl-unique-checks=OFF --tokudb-rpl-lookup-rows-delay=10000 --tokudb-rpl-lookup-rows=OFF --slave-parallel-workers=2 --read-only=ON
--tokudb-rpl-unique-checks-delay=10000
--tokudb-rpl-unique-checks=OFF
--tokudb-rpl-lookup-rows-delay=10000
--tokudb-rpl-lookup-rows=OFF
--read-only=ON --tokudb-rpl-unique-checks-delay=10000 --tokudb-rpl-unique-checks=OFF --tokudb-rpl-lookup-rows-delay=10000 --tokudb-rpl-lookup-rows=OFF --slave-parallel-workers=2 --read-only=ON
--tokudb-rpl-unique-checks-delay=10000
--tokudb-rpl-unique-checks=OFF
--tokudb-rpl-lookup-rows-delay=10000
--tokudb-rpl-lookup-rows=OFF
...@@ -50,7 +50,7 @@ sync_slave_with_master; ...@@ -50,7 +50,7 @@ sync_slave_with_master;
# source include/sync_slave_sql_with_master.inc; # source include/sync_slave_sql_with_master.inc;
connection master; connection master;
select unix_timestamp() into @tend; select unix_timestamp() into @tend;
select @tend-@tstart <= 5; # assert no delay in the delete time #select @tend-@tstart <= 5; # assert no delay in the delete time
connection slave; connection slave;
select * from t; select * from t;
......
--read-only=ON --tokudb-rpl-unique-checks-delay=5000 --tokudb-rpl-unique-checks=OFF --slave-parallel-workers=2 --read-only=ON
--tokudb-rpl-unique-checks-delay=5000
--tokudb-rpl-unique-checks=OFF
...@@ -30,8 +30,8 @@ insert into t values (4); ...@@ -30,8 +30,8 @@ insert into t values (4);
sync_slave_with_master; sync_slave_with_master;
# source include/sync_slave_sql_with_master.inc; # source include/sync_slave_sql_with_master.inc;
connection master; #connection master;
select unix_timestamp()-@tstart <= 10; #select unix_timestamp()-@tstart;
connection slave; connection slave;
# insert into t values (5); # test read-only # insert into t values (5); # test read-only
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
connection slave; connection slave;
let $bit_field_special = ALL_LOSSY; let $bit_field_special = ALL_LOSSY;
let $type= 'INNODB' ; let $type= 'TokuDB';
let $extra_index= ; let $extra_index= ;
-- source extra/rpl_tests/rpl_row_basic.test -- source extra/rpl_tests/rpl_row_basic.test
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
source include/master-slave.inc; source include/master-slave.inc;
source include/have_tokudb.inc; source include/have_tokudb.inc;
source include/have_binlog_format_statement.inc; source include/have_binlog_format_statement.inc;
# gtids disabled because it tests DROP TEMPORARY inside a transaction
source include/not_gtid_enabled.inc;
source extra/rpl_tests/rpl_tokudb.test; source extra/rpl_tests/rpl_tokudb.test;
--source include/rpl_end.inc --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