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]
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]
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]
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