mirror of
https://github.com/MariaDB/server.git
synced 2026-04-17 05:45:33 +02:00
Merge branch 'merge-tokudb-5.6' into 10.0
This commit is contained in:
commit
d527bf5390
192 changed files with 3936 additions and 194538 deletions
|
|
@ -13,3 +13,4 @@ rpl_tokudb_write_unique_uc1: unreliable, uses timestamp differences
|
|||
rpl_tokudb_read_only_ff: unreliable, uses timestamp differences
|
||||
rpl_tokudb_read_only_tf: unreliable, uses timestamp differences
|
||||
rpl_tokudb_read_only_tt: unreliable, uses timestamp differences
|
||||
rpl_tokudb_read_only_ft: no TOKU_INCLUDE_RFR
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
include/master-slave.inc
|
||||
[connection master]
|
||||
set default_storage_engine='tokudb';
|
||||
drop table if exists testr;
|
||||
CREATE TABLE testr (pk int(11) NOT NULL AUTO_INCREMENT, num int(11) DEFAULT NULL, txt varchar(32) DEFAULT NULL, PRIMARY KEY (pk) );
|
||||
INSERT INTO testr VALUES (1,1,'one'),(2,2,'two'),(3,3,'three'),(4,4,'four');
|
||||
replace into testr values (2,2,'twotwo');
|
||||
select * from testr;
|
||||
pk num txt
|
||||
1 1 one
|
||||
2 2 twotwo
|
||||
3 3 three
|
||||
4 4 four
|
||||
select * from testr;
|
||||
pk num txt
|
||||
1 1 one
|
||||
2 2 twotwo
|
||||
3 3 three
|
||||
4 4 four
|
||||
drop table testr;
|
||||
include/rpl_end.inc
|
||||
|
|
@ -3,11 +3,6 @@ include/master-slave.inc
|
|||
drop table if exists t;
|
||||
show variables like 'tokudb_rpl_%';
|
||||
Variable_name Value
|
||||
tokudb_rpl_check_readonly ON
|
||||
tokudb_rpl_lookup_rows OFF
|
||||
tokudb_rpl_lookup_rows_delay 10000
|
||||
tokudb_rpl_unique_checks OFF
|
||||
tokudb_rpl_unique_checks_delay 10000
|
||||
create table t (a bigint not null, primary key(a)) engine=tokudb;
|
||||
insert into t values (1);
|
||||
insert into t values (2),(3);
|
||||
|
|
|
|||
|
|
@ -3,11 +3,6 @@ include/master-slave.inc
|
|||
drop table if exists t;
|
||||
show variables like 'tokudb_rpl_%';
|
||||
Variable_name Value
|
||||
tokudb_rpl_check_readonly ON
|
||||
tokudb_rpl_lookup_rows OFF
|
||||
tokudb_rpl_lookup_rows_delay 10000
|
||||
tokudb_rpl_unique_checks OFF
|
||||
tokudb_rpl_unique_checks_delay 10000
|
||||
create table t (a bigint not null, b bigint not null, primary key(a)) engine=tokudb;
|
||||
insert into t values (1,0);
|
||||
insert into t values (2,0),(3,0);
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ include/master-slave.inc
|
|||
drop table if exists t;
|
||||
show variables like 'tokudb_rpl_unique_checks%';
|
||||
Variable_name Value
|
||||
tokudb_rpl_unique_checks OFF
|
||||
tokudb_rpl_unique_checks_delay 5000
|
||||
create table t (a bigint not null, primary key(a)) engine=tokudb;
|
||||
insert into t values (1);
|
||||
insert into t values (2),(3);
|
||||
|
|
|
|||
21
storage/tokudb/mysql-test/rpl/r/rpl_row_replace_into.result
Normal file
21
storage/tokudb/mysql-test/rpl/r/rpl_row_replace_into.result
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
include/master-slave.inc
|
||||
[connection master]
|
||||
set default_storage_engine='tokudb';
|
||||
drop table if exists testr;
|
||||
CREATE TABLE testr (pk int(11) NOT NULL AUTO_INCREMENT, num int(11) DEFAULT NULL, txt varchar(32) DEFAULT NULL, PRIMARY KEY (pk) );
|
||||
INSERT INTO testr VALUES (1,1,'one'),(2,2,'two'),(3,3,'three'),(4,4,'four');
|
||||
replace into testr values (2,2,'twotwo');
|
||||
select * from testr;
|
||||
pk num txt
|
||||
1 1 one
|
||||
2 2 twotwo
|
||||
3 3 three
|
||||
4 4 four
|
||||
select * from testr;
|
||||
pk num txt
|
||||
1 1 one
|
||||
2 2 twotwo
|
||||
3 3 three
|
||||
4 4 four
|
||||
drop table testr;
|
||||
include/rpl_end.inc
|
||||
21
storage/tokudb/mysql-test/rpl/r/rpl_stmt_replace_into.result
Normal file
21
storage/tokudb/mysql-test/rpl/r/rpl_stmt_replace_into.result
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
include/master-slave.inc
|
||||
[connection master]
|
||||
set default_storage_engine='tokudb';
|
||||
drop table if exists testr;
|
||||
CREATE TABLE testr (pk int(11) NOT NULL AUTO_INCREMENT, num int(11) DEFAULT NULL, txt varchar(32) DEFAULT NULL, PRIMARY KEY (pk) );
|
||||
INSERT INTO testr VALUES (1,1,'one'),(2,2,'two'),(3,3,'three'),(4,4,'four');
|
||||
replace into testr values (2,2,'twotwo');
|
||||
select * from testr;
|
||||
pk num txt
|
||||
1 1 one
|
||||
2 2 twotwo
|
||||
3 3 three
|
||||
4 4 four
|
||||
select * from testr;
|
||||
pk num txt
|
||||
1 1 one
|
||||
2 2 twotwo
|
||||
3 3 three
|
||||
4 4 four
|
||||
drop table testr;
|
||||
include/rpl_end.inc
|
||||
59
storage/tokudb/mysql-test/rpl/r/rpl_xa_interleave.result
Normal file
59
storage/tokudb/mysql-test/rpl/r/rpl_xa_interleave.result
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
include/master-slave.inc
|
||||
[connection master]
|
||||
CREATE TABLE t1(`a` INT) ENGINE=TokuDB;
|
||||
XA START 'x1';
|
||||
INSERT INTO t1 VALUES (1);
|
||||
XA END 'x1';
|
||||
XA PREPARE 'x1';
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (10);
|
||||
COMMIT;
|
||||
XA START 'y1';
|
||||
INSERT INTO t1 VALUES (2);
|
||||
XA END 'y1';
|
||||
XA PREPARE 'y1';
|
||||
XA COMMIT 'x1';
|
||||
XA COMMIT 'y1';
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (11);
|
||||
COMMIT;
|
||||
XA START 'x2';
|
||||
INSERT INTO t1 VALUES (3);
|
||||
XA END 'x2';
|
||||
XA PREPARE 'x2';
|
||||
XA START 'y2';
|
||||
INSERT INTO t1 VALUES (4);
|
||||
XA END 'y2';
|
||||
XA PREPARE 'y2';
|
||||
XA COMMIT 'x2';
|
||||
XA COMMIT 'y2';
|
||||
XA START 'x1';
|
||||
INSERT INTO t1 VALUES (1);
|
||||
XA END 'x1';
|
||||
XA PREPARE 'x1';
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (10);
|
||||
COMMIT;
|
||||
XA START 'y1';
|
||||
INSERT INTO t1 VALUES (2);
|
||||
XA END 'y1';
|
||||
XA PREPARE 'y1';
|
||||
XA ROLLBACK 'x1';
|
||||
XA ROLLBACK 'y1';
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (11);
|
||||
COMMIT;
|
||||
XA START 'x2';
|
||||
INSERT INTO t1 VALUES (3);
|
||||
XA END 'x2';
|
||||
XA PREPARE 'x2';
|
||||
XA START 'y2';
|
||||
INSERT INTO t1 VALUES (4);
|
||||
XA END 'y2';
|
||||
XA PREPARE 'y2';
|
||||
XA ROLLBACK 'x2';
|
||||
XA ROLLBACK 'y2';
|
||||
TABLES t1 and t2 must be equal otherwise an error will be thrown.
|
||||
include/diff_tables.inc [master:test.t1, slave:test.t1]
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
25
storage/tokudb/mysql-test/rpl/t/rpl_mixed_replace_into.test
Normal file
25
storage/tokudb/mysql-test/rpl/t/rpl_mixed_replace_into.test
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
source include/have_tokudb.inc;
|
||||
source include/master-slave.inc;
|
||||
source include/have_binlog_format_mixed.inc;
|
||||
|
||||
set default_storage_engine='tokudb';
|
||||
|
||||
disable_warnings;
|
||||
drop table if exists testr;
|
||||
enable_warnings;
|
||||
|
||||
CREATE TABLE testr (pk int(11) NOT NULL AUTO_INCREMENT, num int(11) DEFAULT NULL, txt varchar(32) DEFAULT NULL, PRIMARY KEY (pk) );
|
||||
INSERT INTO testr VALUES (1,1,'one'),(2,2,'two'),(3,3,'three'),(4,4,'four');
|
||||
replace into testr values (2,2,'twotwo');
|
||||
select * from testr;
|
||||
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
select * from testr;
|
||||
|
||||
connection master;
|
||||
|
||||
drop table testr;
|
||||
|
||||
source include/rpl_end.inc;
|
||||
25
storage/tokudb/mysql-test/rpl/t/rpl_row_replace_into.test
Normal file
25
storage/tokudb/mysql-test/rpl/t/rpl_row_replace_into.test
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
source include/have_tokudb.inc;
|
||||
source include/master-slave.inc;
|
||||
source include/have_binlog_format_row.inc;
|
||||
|
||||
set default_storage_engine='tokudb';
|
||||
|
||||
disable_warnings;
|
||||
drop table if exists testr;
|
||||
enable_warnings;
|
||||
|
||||
CREATE TABLE testr (pk int(11) NOT NULL AUTO_INCREMENT, num int(11) DEFAULT NULL, txt varchar(32) DEFAULT NULL, PRIMARY KEY (pk) );
|
||||
INSERT INTO testr VALUES (1,1,'one'),(2,2,'two'),(3,3,'three'),(4,4,'four');
|
||||
replace into testr values (2,2,'twotwo');
|
||||
select * from testr;
|
||||
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
select * from testr;
|
||||
|
||||
connection master;
|
||||
|
||||
drop table testr;
|
||||
|
||||
source include/rpl_end.inc;
|
||||
25
storage/tokudb/mysql-test/rpl/t/rpl_stmt_replace_into.test
Normal file
25
storage/tokudb/mysql-test/rpl/t/rpl_stmt_replace_into.test
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
source include/have_tokudb.inc;
|
||||
source include/master-slave.inc;
|
||||
source include/have_binlog_format_statement.inc;
|
||||
|
||||
set default_storage_engine='tokudb';
|
||||
|
||||
disable_warnings;
|
||||
drop table if exists testr;
|
||||
enable_warnings;
|
||||
|
||||
CREATE TABLE testr (pk int(11) NOT NULL AUTO_INCREMENT, num int(11) DEFAULT NULL, txt varchar(32) DEFAULT NULL, PRIMARY KEY (pk) );
|
||||
INSERT INTO testr VALUES (1,1,'one'),(2,2,'two'),(3,3,'three'),(4,4,'four');
|
||||
replace into testr values (2,2,'twotwo');
|
||||
select * from testr;
|
||||
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
select * from testr;
|
||||
|
||||
connection master;
|
||||
|
||||
drop table testr;
|
||||
|
||||
source include/rpl_end.inc;
|
||||
103
storage/tokudb/mysql-test/rpl/t/rpl_xa_interleave.test
Normal file
103
storage/tokudb/mysql-test/rpl/t/rpl_xa_interleave.test
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
--source include/have_tokudb.inc
|
||||
--source include/have_binlog_format_mixed_or_row.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
CREATE TABLE t1(`a` INT) ENGINE=TokuDB;
|
||||
|
||||
## XA interleave commit
|
||||
--connection master
|
||||
XA START 'x1';
|
||||
INSERT INTO t1 VALUES (1);
|
||||
XA END 'x1';
|
||||
XA PREPARE 'x1';
|
||||
|
||||
--connection master1
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (10);
|
||||
COMMIT;
|
||||
XA START 'y1';
|
||||
INSERT INTO t1 VALUES (2);
|
||||
XA END 'y1';
|
||||
XA PREPARE 'y1';
|
||||
|
||||
--connection master
|
||||
XA COMMIT 'x1';
|
||||
|
||||
--connection master1
|
||||
XA COMMIT 'y1';
|
||||
|
||||
--connection master
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (11);
|
||||
COMMIT;
|
||||
XA START 'x2';
|
||||
INSERT INTO t1 VALUES (3);
|
||||
XA END 'x2';
|
||||
XA PREPARE 'x2';
|
||||
|
||||
--connection master1
|
||||
XA START 'y2';
|
||||
INSERT INTO t1 VALUES (4);
|
||||
XA END 'y2';
|
||||
XA PREPARE 'y2';
|
||||
|
||||
--connection master
|
||||
XA COMMIT 'x2';
|
||||
|
||||
--connection master1
|
||||
XA COMMIT 'y2';
|
||||
|
||||
## XA interleave rollback
|
||||
--connection master
|
||||
XA START 'x1';
|
||||
INSERT INTO t1 VALUES (1);
|
||||
XA END 'x1';
|
||||
XA PREPARE 'x1';
|
||||
|
||||
--connection master1
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (10);
|
||||
COMMIT;
|
||||
XA START 'y1';
|
||||
INSERT INTO t1 VALUES (2);
|
||||
XA END 'y1';
|
||||
XA PREPARE 'y1';
|
||||
|
||||
--connection master
|
||||
XA ROLLBACK 'x1';
|
||||
|
||||
--connection master1
|
||||
XA ROLLBACK 'y1';
|
||||
|
||||
--connection master
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (11);
|
||||
COMMIT;
|
||||
XA START 'x2';
|
||||
INSERT INTO t1 VALUES (3);
|
||||
XA END 'x2';
|
||||
XA PREPARE 'x2';
|
||||
|
||||
--connection master1
|
||||
XA START 'y2';
|
||||
INSERT INTO t1 VALUES (4);
|
||||
XA END 'y2';
|
||||
XA PREPARE 'y2';
|
||||
|
||||
--connection master
|
||||
XA ROLLBACK 'x2';
|
||||
|
||||
--connection master1
|
||||
XA ROLLBACK 'y2';
|
||||
|
||||
--connection master
|
||||
|
||||
--sync_slave_with_master
|
||||
|
||||
--echo TABLES t1 and t2 must be equal otherwise an error will be thrown.
|
||||
--let $diff_tables= master:test.t1, slave:test.t1
|
||||
--source include/diff_tables.inc
|
||||
|
||||
--connection master
|
||||
DROP TABLE t1;
|
||||
--source include/rpl_end.inc
|
||||
Loading…
Add table
Add a link
Reference in a new issue