mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
511ef0cc29
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-rpl mysql-test/extra/rpl_tests/rpl_log.test: Auto merged mysql-test/extra/rpl_tests/rpl_row_basic.test: Auto merged mysql-test/t/rpl_ndb_bank.test: Auto merged mysql-test/t/rpl_ndb_basic.test: Auto merged mysql-test/t/rpl_ndb_do_table.test: Auto merged mysql-test/t/rpl_ndb_idempotent.test: Auto merged mysql-test/t/rpl_ndb_stm_innodb.test: Auto merged mysql-test/t/rpl_ndb_sync.test: Auto merged sql/ha_ndbcluster_binlog.cc: Auto merged storage/ndb/test/run-test/daily-basic-tests.txt: Auto merged mysql-test/include/have_multi_ndb.inc: manual merge mysql-test/include/have_ndb.inc: manual merge mysql-test/t/rpl_ndb_commit_afterflush.test: manual merge mysql-test/t/rpl_ndb_ddl.test: manual merge mysql-test/t/rpl_ndb_innodb_trans.test: manual merge
67 lines
1.5 KiB
Text
67 lines
1.5 KiB
Text
# Test of a transaction mixing the two engines
|
|
|
|
-- source include/have_ndb.inc
|
|
-- source include/have_innodb.inc
|
|
-- source include/have_binlog_format_row.inc
|
|
-- source include/ndb_master-slave.inc
|
|
|
|
create table t1 (a int, unique(a)) engine=ndbcluster;
|
|
create table t2 (a int, unique(a)) engine=innodb;
|
|
|
|
|
|
begin;
|
|
insert into t1 values(1);
|
|
insert into t2 values(1);
|
|
rollback;
|
|
|
|
select count(*) from t1;
|
|
select count(*) from t2;
|
|
sync_slave_with_master;
|
|
select count(*) from t1;
|
|
select count(*) from t2;
|
|
connection master;
|
|
|
|
begin;
|
|
load data infile '../std_data_ln/rpl_loaddata.dat' into table t2;
|
|
load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
|
|
rollback;
|
|
|
|
select count(*) from t1;
|
|
select count(*) from t2;
|
|
sync_slave_with_master;
|
|
select count(*) from t1;
|
|
select count(*) from t2;
|
|
connection master;
|
|
|
|
delete from t1;
|
|
delete from t2;
|
|
begin;
|
|
load data infile '../std_data_ln/rpl_loaddata.dat' into table t2;
|
|
load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
|
|
rollback;
|
|
|
|
select count(*) from t1;
|
|
select count(*) from t2;
|
|
sync_slave_with_master;
|
|
select count(*) from t1;
|
|
select count(*) from t2;
|
|
connection master;
|
|
|
|
delete from t1;
|
|
delete from t2;
|
|
begin;
|
|
insert into t2 values(3),(4);
|
|
insert into t1 values(3),(4);
|
|
load data infile '../std_data_ln/rpl_loaddata.dat' into table t2;
|
|
load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
|
|
rollback;
|
|
|
|
select count(*) from t1;
|
|
select count(*) from t2;
|
|
sync_slave_with_master;
|
|
select count(*) from t1;
|
|
select count(*) from t2;
|
|
connection master;
|
|
|
|
drop table t1,t2;
|
|
sync_slave_with_master;
|