mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +03:00
Update the disabled.def files to reflect actual contents of the t/* directories. Also, move a few more tests into suite/*. mysql-test/suite/parts/t/rpl_partition.test: Rename: mysql-test/t/rpl_partition.test -> mysql-test/suite/parts/t/rpl_partition.test mysql-test/suite/parts/r/rpl_partition.result: Rename: mysql-test/r/rpl_partition.result -> mysql-test/suite/parts/r/rpl_partition.result mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt: Rename: mysql-test/t/rpl_ndb_ctype_ucs2_def-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test: Rename: mysql-test/t/rpl_ndb_ctype_ucs2_def.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb-master.opt: Rename: mysql-test/t/rpl_ndb_mix_innodb-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb-master.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb.test: Rename: mysql-test/t/rpl_ndb_mix_innodb.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb.test mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result: Rename: mysql-test/r/rpl_ndb_ctype_ucs2_def.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result mysql-test/suite/rpl_ndb/r/rpl_ndb_mix_innodb.result: Rename: mysql-test/r/rpl_ndb_mix_innodb.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_mix_innodb.result mysql-test/suite/ndb/t/disabled.def: Some tests have moved to suite/*, and some have been removed. Update disabled.def files to be consistent with actual t/* contents. mysql-test/suite/parts/t/disabled.def: Some tests have moved to suite/*, and some have been removed. Update disabled.def files to be consistent with actual t/* contents. mysql-test/suite/rpl/t/disabled.def: Some tests have moved to suite/*, and some have been removed. Update disabled.def files to be consistent with actual t/* contents. mysql-test/suite/rpl_ndb/t/disabled.def: Some tests have moved to suite/*, and some have been removed. Update disabled.def files to be consistent with actual t/* contents. mysql-test/t/disabled.def: Some tests have moved to suite/*, and some have been removed. Update disabled.def files to be consistent with actual t/* contents.
130 lines
3.8 KiB
Plaintext
130 lines
3.8 KiB
Plaintext
stop slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
reset master;
|
|
reset slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
start slave;
|
|
|
|
*** Test 1 ***
|
|
|
|
create table t1 (a int key, b int) engine innodb;
|
|
create table t2 (a int key, b int) engine innodb;
|
|
|
|
alter table t1 engine ndb;
|
|
alter table t2 engine ndb;
|
|
|
|
insert into t1 values (1,2);
|
|
|
|
select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos
|
|
from mysql.ndb_apply_status;
|
|
@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos
|
|
<log_name> <start_pos> <end_pos>
|
|
|
|
show binlog events from <start_pos> limit 1;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 <start_pos> Query 1 # use `test`; insert into t1 values (1,2)
|
|
|
|
show binlog events from <start_pos> limit 1,1;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Xid 1 445 COMMIT /* XID */
|
|
|
|
begin;
|
|
insert into t1 values (2,3);
|
|
insert into t2 values (3,4);
|
|
commit;
|
|
|
|
select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos
|
|
from mysql.ndb_apply_status;
|
|
@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos
|
|
<log_name> <start_pos> <end_pos>
|
|
show binlog events from <start_pos> limit 1;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 <start_pos> Query 1 # use `test`; BEGIN
|
|
|
|
show binlog events from <start_pos> limit 1,2;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Query # # use `test`; insert into t1 values (2,3)
|
|
master-bin.000001 # Query # # use `test`; insert into t2 values (3,4)
|
|
|
|
show binlog events from <start_pos> limit 3,1;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */
|
|
|
|
DROP TABLE test.t1, test.t2;
|
|
SHOW TABLES;
|
|
Tables_in_test
|
|
|
|
*** Test 2 ***
|
|
|
|
DROP DATABASE IF EXISTS tpcb;
|
|
CREATE DATABASE tpcb;
|
|
|
|
CREATE TABLE tpcb.account (id INT, bid INT, balance DECIMAL(10,2),
|
|
filler CHAR(255), PRIMARY KEY(id));
|
|
|
|
CREATE TABLE tpcb.branch (bid INT, balance DECIMAL(10,2), filler VARCHAR(255),
|
|
PRIMARY KEY(bid));
|
|
|
|
CREATE TABLE tpcb.teller (tid INT, balance DECIMAL(10,2), filler VARCHAR(255),
|
|
PRIMARY KEY(tid));
|
|
|
|
CREATE TABLE tpcb.history (id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT,
|
|
tid INT, bid INT, amount DECIMAL(10,2),
|
|
tdate DATETIME, teller CHAR(20), uuidf LONGBLOB,
|
|
filler CHAR(80),PRIMARY KEY (id));
|
|
|
|
--- Create stored procedures & functions ---
|
|
|
|
|
|
*** Stored Procedures Created ***
|
|
|
|
USE tpcb;
|
|
ALTER TABLE account ENGINE NDB;
|
|
ALTER TABLE branch ENGINE NDB;
|
|
ALTER TABLE teller ENGINE NDB;
|
|
ALTER TABLE history ENGINE NDB;
|
|
|
|
select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos
|
|
from mysql.ndb_apply_status;
|
|
@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos
|
|
<log_name> <start_pos> <end_pos>
|
|
|
|
show binlog events in 'master-bin.000001' from <start_pos> limit 9,1;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */
|
|
|
|
** Test 3 **
|
|
|
|
FLUSH LOGS;
|
|
|
|
select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos
|
|
from mysql.ndb_apply_status;
|
|
@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos
|
|
<log_name> <start_pos> <end_pos>
|
|
|
|
show binlog events in 'master-bin.000002' from <start_pos> limit 9,1;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000002 # Xid 1 <end_pos> COMMIT /* XID */
|
|
|
|
** Test 4 **
|
|
|
|
stop slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
reset master;
|
|
reset slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
start slave;
|
|
|
|
select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos
|
|
from mysql.ndb_apply_status;
|
|
@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos
|
|
<log_name> <start_pos> <end_pos>
|
|
|
|
show binlog events in 'master-bin.000001' from <start_pos> limit 9,1;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */
|
|
|
|
*** DUMP MASTER & SLAVE FOR COMPARE ********
|
|
DROP DATABASE tpcb;
|
|
****** Do dumps compare ************
|