MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //usr/local/ssl/share/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test
# Test of a transaction mixing the two engines

-- source include/have_ndb.inc
-- source include/have_innodb.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/rpl_loaddata.dat' into table t2;
load data infile '../../../std_data/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/rpl_loaddata.dat' into table t2;
load data infile '../../../std_data/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/rpl_loaddata.dat' into table t2;
load data infile '../../../std_data/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;
--source include/rpl_end.inc