Debian Codegraph @

mysql-test/suite/rpl_gtid/r/rpl_tablespace.result

raw
1 #########################################################################
2 #
3 # REPLICATION TABLESPACE RELATED TESTS.
4 #
5 #########################################################################
6 #
7 # Bug#21081898 INNODB: TABLESPACE RELATED DDLS ARE NOT COMMITTING ONGOING
8 # TRANSACTION
9 #
10 # Patch for this bug also fixes Bug#21082728: ASSERT
11 # `THD->VARIABLES.GTID_NEXT.TYPE != UNDEFINED_GROUP'
12 # FOR DML+TABLESPACE DDL
13 #
14 # #######################################################################
15 include/master-slave.inc
16 Warnings:
17 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
18 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
19 [connection master]
20 [On MASTER]
21 # TEST Bug#21082728: Execute CREATE TABLESPACE inside active transaction
22 # with GTID_NEXT set. Check for proper error code and transaction state
23 # by verifying table content after issuing a ROLLBACK.
24 CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=INNODB;
25 SET @saved_gtid_next= @@session.gtid_next;
26 SET GTID_NEXT='aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1';
27 BEGIN;
28 INSERT INTO t1 VALUES (1);
29 CREATE TABLESPACE ts1 ADD DATAFILE './ts1.ibd' ENGINE=INNODB;
30 ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'.
31 ROLLBACK;
32 SET GTID_NEXT='aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:2';
33 # Select should return Empty result
34 SELECT * FROM t1;
35 a
36 # Issue ROLLBACK to release GTID
37 ROLLBACK;
38 # TEST Bug#21081898: Execute CREATE TABLESPACE inside active transaction
39 # with GTID_NEXT=automatic. Check table content for impliciti commit.
40 SET GTID_NEXT = 'AUTOMATIC';
41 BEGIN;
42 INSERT INTO t1 VALUES (1);
43 CREATE TABLESPACE ts1 ADD DATAFILE './ts1.ibd' ENGINE=INNODB;
44 ROLLBACK;
45 # Select should return one row inserted above
46 SELECT * FROM t1;
47 a
48 1
49 # Cleanup
50 DROP TABLE t1;
51 DROP TABLESPACE ts1;
52 SET GTID_NEXT= @saved_gtid_next;
53 # "STOP SLAVE" and verify that the SQL thread was properly stopped and
54 # left no gaps.
55 include/rpl_end.inc