Skip to content

Commit 5675df7

Browse files
author
Arpit Goswami
committed
WL#10495 Replication Usability: Deprecate writing multiple engines when at leastone is non-transactional or non-composable
This worklog deprecates writing transactions/statements to tables associated to multiple engines if atleast one is non-transactional or non-composable engine. Change-Id: I72775292f5ed8c9bb4df8a5f9be519d958d4753c
1 parent 8374b2a commit 5675df7

File tree

74 files changed

+6484
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+6484
-3
lines changed

mysql-test/r/flush_read_lock.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,6 +1540,8 @@ alter table t1_temp drop column c1;
15401540
begin;
15411541
insert into t1_base values (1);
15421542
insert into t3_trans values (1);
1543+
Warnings:
1544+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t3_trans and the MyISAM table test.t1_base.
15431545
# Switching to connection 'con1'.
15441546
# The below FTWRL should not be blocked by transaction in 'default'.
15451547
flush tables with read lock;

mysql-test/r/foreign_key_myisam.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ ALTER TABLE parent ENGINE=InnoDB;
180180
ERROR HY000: Table 'child' was locked with a READ lock and can't be updated
181181
UNLOCK TABLES;
182182
LOCK TABLES child WRITE, parent WRITE;
183+
Warnings:
184+
Warning 6136 Combining the storage engines MyISAM and InnoDB is deprecated, but the statement or transaction updates both the MyISAM table test.parent and the InnoDB table test.child.
183185
ALTER TABLE parent ENGINE=InnoDB;
184186
UNLOCK TABLES;
185187
DROP TABLES child, parent;

mysql-test/r/lock_multi.result

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,8 @@ UNLOCK TABLES;
963963
# 2.c) Blocks concurrent modifications to table
964964
connection default;
965965
LOCK TABLE t1 WRITE, t2 WRITE;
966+
Warnings:
967+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t2 and the MyISAM table test.t1.
966968
connection con1;
967969
# Sending:
968970
INSERT INTO t1 VALUES (1);
@@ -2099,6 +2101,8 @@ i
20992101
1
21002102
connection default;
21012103
LOCK TABLE t8 WRITE;
2104+
Warnings:
2105+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t2 and the MyISAM table test.t8.
21022106
connection con1;
21032107
# Sending:
21042108
SELECT * FROM t2;;
@@ -2165,11 +2169,15 @@ RELEASE_LOCK('mysqltest_lock')
21652169
1
21662170
connection con2;
21672171
# Reaping LOCK TABLE WRITE
2172+
Warnings:
2173+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t2 and the MyISAM table test.t8.
21682174
UNLOCK TABLES;
21692175
#
21702176
# 7.c) Blocks concurrent modifications to table
21712177
connection default;
21722178
LOCK TABLE t7 WRITE, t8 WRITE;
2179+
Warnings:
2180+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t2 and the MyISAM table test.t7.
21732181
connection con1;
21742182
# Sending:
21752183
INSERT INTO t1 VALUES (1);
@@ -2240,6 +2248,8 @@ RELEASE_LOCK('mysqltest_lock')
22402248
1
22412249
connection con2;
22422250
# Reaping LOCK TABLES WRITE
2251+
Warnings:
2252+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t2 and the MyISAM table test.t8.
22432253
UNLOCK TABLES;
22442254
connection default;
22452255
# Revert effects from INSERTs
@@ -2276,6 +2286,8 @@ connection default;
22762286
COMMIT;
22772287
connection con1;
22782288
# Reap LOCK TABLES WRITE
2289+
Warnings:
2290+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t2 and the MyISAM table test.t8.
22792291
UNLOCK TABLES;
22802292
connection default;
22812293
#
@@ -2305,6 +2317,8 @@ connection default;
23052317
COMMIT;
23062318
connection con1;
23072319
# Reap LOCK TABLES WRITE
2320+
Warnings:
2321+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t2 and the MyISAM table test.t8.
23082322
UNLOCK TABLES;
23092323
connection default;
23102324
# Revert effects from INSERTs
@@ -2326,6 +2340,8 @@ connection con1;
23262340
UNLOCK TABLES;
23272341
connection default;
23282342
LOCK TABLES t8 WRITE;
2343+
Warnings:
2344+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t2 and the MyISAM table test.t8.
23292345
connection con1;
23302346
# Sending:
23312347
LOCK TABLES t2 WRITE;;

mysql-test/r/mix2_myisam.result

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,8 @@ CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) ENGINE=MyISAM;
11791179
SET AUTOCOMMIT=0;
11801180
INSERT INTO t1 ( B_ID ) VALUES ( 1 );
11811181
INSERT INTO t2 ( NEXT_T ) VALUES ( 1 );
1182+
Warnings:
1183+
Warning 6136 Combining the storage engines MEMORY and MyISAM is deprecated, but the statement or transaction updates both the MEMORY table test.t2 and the MyISAM table test.t1.
11821184
ROLLBACK;
11831185
Warnings:
11841186
Warning 1196 Some non-transactional changed tables couldn't be rolled back
@@ -1199,6 +1201,8 @@ create table t1 (a int not null auto_increment primary key, b int, c int, key(c)
11991201
create table t2 (a int not null auto_increment primary key, b int) ENGINE = MEMORY;
12001202
insert into t1 (b) values (null),(null),(null),(null),(null),(null),(null);
12011203
insert into t2 (a) select b from t1;
1204+
Warnings:
1205+
Warning 6136 Combining the storage engines MEMORY and MyISAM is deprecated, but the statement or transaction updates both the MEMORY table test.t2 and the MyISAM table test.t1.
12021206
insert into t1 (b) select b from t2;
12031207
insert into t2 (a) select b from t1;
12041208
insert into t1 (a) select b from t2;

mysql-test/r/no_binlog_gtid_next_partially_failed_stmts.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ SET SESSION GTID_NEXT='MASTER_UUID:7';
190190
OPTIMIZE TABLE t1, t_non_existent;
191191
Table Op Msg_type Msg_text
192192
test.t1 optimize status Table is already up to date
193+
test.t_non_existent optimize Warning Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table mysql.gtid_executed and the MyISAM table test.t1.
193194
test.t_non_existent optimize Error Table 'test.t_non_existent' doesn't exist
194195
test.t_non_existent optimize status Operation failed
195196
#
@@ -230,6 +231,7 @@ SET SESSION GTID_NEXT='MASTER_UUID:9';
230231
REPAIR TABLE t1, t_non_existent;
231232
Table Op Msg_type Msg_text
232233
test.t1 repair status OK
234+
test.t_non_existent repair Warning Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table mysql.gtid_executed and the MyISAM table test.t1.
233235
test.t_non_existent repair Error Table 'test.t_non_existent' doesn't exist
234236
test.t_non_existent repair status Operation failed
235237
#

mysql-test/r/partition_innodb_semi_consistent.result

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ SELECT * FROM t1;
103103
a b
104104
1 init+con1
105105
# Switch to connection con2
106+
Warnings:
107+
Warning 6136 Combining the storage engines MyISAM and InnoDB is deprecated, but the statement or transaction updates both the MyISAM table test.t2 and the InnoDB table test.t1.
106108
SELECT * FROM t1;
107109
a b
108110
1 init+con1+con2
@@ -130,6 +132,8 @@ SELECT * FROM t1;
130132
a b
131133
2 init+con1
132134
# Switch to connection con2
135+
Warnings:
136+
Warning 6136 Combining the storage engines MyISAM and InnoDB is deprecated, but the statement or transaction updates both the MyISAM table test.t2 and the InnoDB table test.t1.
133137
SELECT * FROM t1;
134138
a b
135139
2 init+con1

mysql-test/r/rename_debug_myisam.result

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ CREATE TABLE t0 (m INT) ENGINE=MyISAM;
2424
# from the set of locked tables. Metadata locks on both
2525
# old and new table names are kept.
2626
LOCK TABLES t1 WRITE, t2 WRITE, t0 WRITE;
27+
Warnings:
28+
Warning 6136 Combining the storage engines MyISAM and InnoDB is deprecated, but the statement or transaction updates both the MyISAM table test.t0 and the InnoDB table test.t1.
2729
SET @@debug='+d,injecting_fault_writing';
2830
RENAME TABLES t0 TO t00, t1 TO t01;
2931
ERROR HY000: Error writing file 'binlog' ((errno: #)
@@ -72,6 +74,8 @@ CREATE TABLE t1 (i INT) ENGINE=InnoDB;
7274
CREATE TABLE t0 (l INT) ENGINE=MyISAM;
7375
CREATE DATABASE mysqltest;
7476
LOCK TABLES t0 WRITE, t1 WRITE;
77+
Warnings:
78+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t1 and the MyISAM table test.t0.
7579
SET @@debug='+d,injecting_fault_writing';
7680
RENAME TABLES t0 TO mysqltest.t0, t1 TO t01;
7781
ERROR HY000: Error writing file 'binlog' ((errno: #)

mysql-test/r/rename_myisam.result

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ CREATE TABLE t2 (j INT) ENGINE=InnoDB;
3333
CREATE TABLE t3 (k INT) ENGINE=InnoDB;
3434
CREATE TABLE t4 (l INT) ENGINE=InnoDB;
3535
LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE, t0 WRITE;
36+
Warnings:
37+
Warning 6136 Combining the storage engines MyISAM and InnoDB is deprecated, but the statement or transaction updates both the MyISAM table test.t0 and the InnoDB table test.t1.
3638
RENAME TABLES t0 TO t00, t1 TO t01, t2 TO t4;
3739
ERROR 42S01: Table 't4' already exists
3840
# Tables are available under old names.
@@ -151,6 +153,8 @@ UNLOCK TABLES;
151153
# state of metadata locks too.
152154
# This part of the test resides in rename_myisam.test.
153155
LOCK TABLES t4 WRITE, t1 WRITE;
156+
Warnings:
157+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t1 and the MyISAM table test.t4.
154158
RENAME TABLES t4 TO mysqltest.t4, t1 TO t3;
155159
ERROR 42S01: Table 't3' already exists
156160
# Tables are available under old names.

mysql-test/r/session_tracker_trx_state_myisam.result

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ START TRANSACTION;
6464
INSERT INTO t1 VALUES (1);
6565
# resulting state should be "wW", both safe and unsafe writes happened:
6666
INSERT INTO t2 VALUES (1);
67+
Warnings:
68+
Warning 6136 Combining the storage engines MyISAM and InnoDB is deprecated, but the statement or transaction updates both the MyISAM table test.t2 and the InnoDB table test.t1.
6769
# resulting state should STILL be "wW"!
6870
INSERT INTO t1 VALUES (1);
6971
ROLLBACK;
@@ -74,6 +76,8 @@ START TRANSACTION;
7476
INSERT INTO t2 VALUES (1);
7577
# resulting state should be "wW", both safe and unsafe writes happened:
7678
INSERT INTO t1 VALUES (1);
79+
Warnings:
80+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t1 and the MyISAM table test.t2.
7781
# resulting state should be "RwW" (adding transactional read):
7882
SELECT f1 FROM t1;
7983
f1
@@ -135,6 +139,8 @@ CREATE TABLE t1 (f1 INT) ENGINE="InnoDB";
135139
CREATE TABLE t2 (f1 INT) ENGINE="MyISAM";
136140
BEGIN;
137141
COMMIT; INSERT INTO t2 VALUES (1); BEGIN; INSERT INTO t1 VALUES (99); |
142+
Warnings:
143+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t1 and the MyISAM table test.t2.
138144
COMMIT;
139145
DROP TABLE t1;
140146
DROP TABLE t2;
@@ -366,8 +372,12 @@ UNLOCK TABLES;
366372

367373
SET autocommit=1;
368374
LOCK TABLE t1 WRITE, t2 WRITE;
375+
Warnings:
376+
Warning 6136 Combining the storage engines MyISAM and InnoDB is deprecated, but the statement or transaction updates both the MyISAM table test.t2 and the InnoDB table test.t1.
369377
INSERT INTO t2 VALUES (3);
370378
INSERT INTO t1 VALUES (3);
379+
Warnings:
380+
Warning 6136 Combining the storage engines InnoDB and MyISAM is deprecated, but the statement or transaction updates both the InnoDB table test.t1 and the MyISAM table test.t2.
371381
SELECT f1 FROM t1 WHERE f1 > 2;
372382
f1
373383
3

mysql-test/r/sp.result

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6109,11 +6109,15 @@ set @a=@a+1;
61096109
return @a;
61106110
end|
61116111
update t2 set b=1 where a=bug27354();
6112+
Warnings:
6113+
Warning 6136 Combining the storage engines MyISAM and InnoDB is deprecated, but the statement or transaction updates both the MyISAM table test.t1 and the InnoDB table test.t2.
61126114
select count(t_1.a),count(t_2.a) from t1 as t_1, t2 as t_2 /* must be 0,0 */;
61136115
count(t_1.a) count(t_2.a)
61146116
0 0
61156117
insert into t2 values (1,1),(2,2),(3,3);
61166118
update t2 set b=-b where a=bug27354();
6119+
Warnings:
6120+
Warning 6136 Combining the storage engines MyISAM and InnoDB is deprecated, but the statement or transaction updates both the MyISAM table test.t1 and the InnoDB table test.t2.
61176121
select * from t2 /* must return 1,-1 ... */;
61186122
a b
61196123
1 -1

0 commit comments

Comments
 (0)