1include/begin_replace_gtid_combination.inc [gtid_mode=off/on -> default_storage_engine=InnoDB/MyISAM] 2include/rpl_init.inc [topology=none] 3SET @old_sql_notes= @@GLOBAL.SQL_NOTES; 4SET GLOBAL SQL_NOTES= 0; 5SET SESSION SQL_NOTES= 0; 6CALL mtr.add_suppression('Statement violates GTID consistency:'); 7CALL mtr.add_suppression('Unsafe statement written to the binary log'); 8SET GLOBAL ENFORCE_GTID_CONSISTENCY = 0; 9SET GLOBAL GTID_MODE = OFF_PERMISSIVE; 10SET GLOBAL GTID_MODE = ON_PERMISSIVE; 11SET GLOBAL GTID_MODE = 2; 12######## ENFORCE_GTID_CONSISTENCY=OFF GTID_MODE=ON_PERMISSIVE GTID_NEXT=AUTOMATIC ######## 13CREATE TABLE t0 (a INT) ENGINE = InnoDB; 14CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 15CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 16CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 17CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 18INSERT INTO nonempty_innodb VALUES (1); 19INSERT INTO nonempty_myisam VALUES (1); 20---- CREATE ... SELECT (value, 1 row) ---- 21# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=AUTOMATIC 22SET GTID_NEXT = 'AUTOMATIC'; 23error ER_GTID_UNSAFE_CREATE_SELECT 24CREATE TABLE t1 (a INT) SELECT 1; 25ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 26include/assert.inc [One warning/error should be generated.] 27include/assert.inc [It should be an Error, not a Warning.] 28include/assert.inc [Text should be "violates GTID consistency"] 29include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 30include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 31ROLLBACK; 32SET GTID_NEXT = 'AUTOMATIC'; 33include/assert.inc [Both counters should be 0] 34DROP TABLE IF EXISTS t1; 35Warnings: 36Note 1051 Unknown table 'test.t1' 37---- CREATE ... SELECT (InnoDB, 1 row) ---- 38# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=AUTOMATIC 39SET GTID_NEXT = 'AUTOMATIC'; 40error ER_GTID_UNSAFE_CREATE_SELECT 41CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 42ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 43include/assert.inc [One warning/error should be generated.] 44include/assert.inc [It should be an Error, not a Warning.] 45include/assert.inc [Text should be "violates GTID consistency"] 46include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 47include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 48ROLLBACK; 49SET GTID_NEXT = 'AUTOMATIC'; 50include/assert.inc [Both counters should be 0] 51DROP TABLE IF EXISTS t1; 52Warnings: 53Note 1051 Unknown table 'test.t1' 54---- CREATE ... SELECT (MyISAM, 1 row) ---- 55# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=AUTOMATIC 56SET GTID_NEXT = 'AUTOMATIC'; 57error ER_GTID_UNSAFE_CREATE_SELECT 58CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 59ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 60include/assert.inc [One warning/error should be generated.] 61include/assert.inc [It should be an Error, not a Warning.] 62include/assert.inc [Text should be "violates GTID consistency"] 63include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 64include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 65ROLLBACK; 66SET GTID_NEXT = 'AUTOMATIC'; 67include/assert.inc [Both counters should be 0] 68DROP TABLE IF EXISTS t1; 69Warnings: 70Note 1051 Unknown table 'test.t1' 71---- CREATE ... SELECT (InnoDB, 0 row) ---- 72# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=AUTOMATIC 73SET GTID_NEXT = 'AUTOMATIC'; 74error ER_GTID_UNSAFE_CREATE_SELECT 75CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 76ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 77include/assert.inc [One warning/error should be generated.] 78include/assert.inc [It should be an Error, not a Warning.] 79include/assert.inc [Text should be "violates GTID consistency"] 80include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 81include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 82ROLLBACK; 83SET GTID_NEXT = 'AUTOMATIC'; 84include/assert.inc [Both counters should be 0] 85DROP TABLE IF EXISTS t1; 86Warnings: 87Note 1051 Unknown table 'test.t1' 88---- CREATE ... SELECT (MyISAM, 0 row) ---- 89# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=AUTOMATIC 90SET GTID_NEXT = 'AUTOMATIC'; 91error ER_GTID_UNSAFE_CREATE_SELECT 92CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 93ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 94include/assert.inc [One warning/error should be generated.] 95include/assert.inc [It should be an Error, not a Warning.] 96include/assert.inc [Text should be "violates GTID consistency"] 97include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 98include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 99ROLLBACK; 100SET GTID_NEXT = 'AUTOMATIC'; 101include/assert.inc [Both counters should be 0] 102DROP TABLE IF EXISTS t1; 103Warnings: 104Note 1051 Unknown table 'test.t1' 105---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 106# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=AUTOMATIC 107SET GTID_NEXT = 'AUTOMATIC'; 108BEGIN; INSERT INTO t0 VALUES (1);; 109error ER_GTID_UNSAFE_CREATE_SELECT 110CREATE TABLE t1 (a INT) SELECT 1; 111ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 112include/assert.inc [One warning/error should be generated.] 113include/assert.inc [It should be an Error, not a Warning.] 114include/assert.inc [Text should be "violates GTID consistency"] 115include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 116include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 117ROLLBACK; 118SET GTID_NEXT = 'AUTOMATIC'; 119include/assert.inc [Both counters should be 0] 120DROP TABLE IF EXISTS t1; 121Warnings: 122Note 1051 Unknown table 'test.t1' 123---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 124# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=AUTOMATIC 125SET GTID_NEXT = 'AUTOMATIC'; 126BEGIN; INSERT INTO t0 VALUES (1);; 127error ER_GTID_UNSAFE_CREATE_SELECT 128CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 129ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 130include/assert.inc [One warning/error should be generated.] 131include/assert.inc [It should be an Error, not a Warning.] 132include/assert.inc [Text should be "violates GTID consistency"] 133include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 134include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 135ROLLBACK; 136SET GTID_NEXT = 'AUTOMATIC'; 137include/assert.inc [Both counters should be 0] 138DROP TABLE IF EXISTS t1; 139Warnings: 140Note 1051 Unknown table 'test.t1' 141---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 142# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=AUTOMATIC 143SET GTID_NEXT = 'AUTOMATIC'; 144BEGIN; INSERT INTO t0 VALUES (1);; 145error ER_GTID_UNSAFE_CREATE_SELECT 146CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 147ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 148include/assert.inc [One warning/error should be generated.] 149include/assert.inc [It should be an Error, not a Warning.] 150include/assert.inc [Text should be "violates GTID consistency"] 151include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 152include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 153ROLLBACK; 154SET GTID_NEXT = 'AUTOMATIC'; 155include/assert.inc [Both counters should be 0] 156DROP TABLE IF EXISTS t1; 157Warnings: 158Note 1051 Unknown table 'test.t1' 159---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 160# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=AUTOMATIC 161SET GTID_NEXT = 'AUTOMATIC'; 162BEGIN; INSERT INTO t0 VALUES (1);; 163error ER_GTID_UNSAFE_CREATE_SELECT 164CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 165ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 166include/assert.inc [One warning/error should be generated.] 167include/assert.inc [It should be an Error, not a Warning.] 168include/assert.inc [Text should be "violates GTID consistency"] 169include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 170include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 171ROLLBACK; 172SET GTID_NEXT = 'AUTOMATIC'; 173include/assert.inc [Both counters should be 0] 174DROP TABLE IF EXISTS t1; 175Warnings: 176Note 1051 Unknown table 'test.t1' 177---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 178# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=AUTOMATIC 179SET GTID_NEXT = 'AUTOMATIC'; 180BEGIN; INSERT INTO t0 VALUES (1);; 181error ER_GTID_UNSAFE_CREATE_SELECT 182CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 183ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 184include/assert.inc [One warning/error should be generated.] 185include/assert.inc [It should be an Error, not a Warning.] 186include/assert.inc [Text should be "violates GTID consistency"] 187include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 188include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 189ROLLBACK; 190SET GTID_NEXT = 'AUTOMATIC'; 191include/assert.inc [Both counters should be 0] 192DROP TABLE IF EXISTS t1; 193Warnings: 194Note 1051 Unknown table 'test.t1' 195DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 196######## ENFORCE_GTID_CONSISTENCY=OFF GTID_MODE=ON_PERMISSIVE GTID_NEXT=ANONYMOUS ######## 197CREATE TABLE t0 (a INT) ENGINE = InnoDB; 198CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 199CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 200CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 201CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 202INSERT INTO nonempty_innodb VALUES (1); 203INSERT INTO nonempty_myisam VALUES (1); 204---- CREATE ... SELECT (value, 1 row) ---- 205# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=ANONYMOUS 206SET GTID_NEXT = 'ANONYMOUS'; 207[START] CREATE TABLE t1 (a INT) SELECT 1; 208include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 209include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 210[END] CREATE TABLE t1 (a INT) SELECT 1; 211include/assert.inc [No warning or error should be generated.] 212include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 213include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 214ROLLBACK; 215SET GTID_NEXT = 'AUTOMATIC'; 216include/assert.inc [Both counters should be 0] 217DROP TABLE IF EXISTS t1; 218---- CREATE ... SELECT (InnoDB, 1 row) ---- 219# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=ANONYMOUS 220SET GTID_NEXT = 'ANONYMOUS'; 221[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 222include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 223include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 224[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 225include/assert.inc [No warning or error should be generated.] 226include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 227include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 228ROLLBACK; 229SET GTID_NEXT = 'AUTOMATIC'; 230include/assert.inc [Both counters should be 0] 231DROP TABLE IF EXISTS t1; 232---- CREATE ... SELECT (MyISAM, 1 row) ---- 233# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=ANONYMOUS 234SET GTID_NEXT = 'ANONYMOUS'; 235[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 236include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 237include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 238[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 239include/assert.inc [No warning or error should be generated.] 240include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 241include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 242ROLLBACK; 243SET GTID_NEXT = 'AUTOMATIC'; 244include/assert.inc [Both counters should be 0] 245DROP TABLE IF EXISTS t1; 246---- CREATE ... SELECT (InnoDB, 0 row) ---- 247# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=ANONYMOUS 248SET GTID_NEXT = 'ANONYMOUS'; 249[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 250include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 251include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 252[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 253include/assert.inc [No warning or error should be generated.] 254include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 255include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 256ROLLBACK; 257SET GTID_NEXT = 'AUTOMATIC'; 258include/assert.inc [Both counters should be 0] 259DROP TABLE IF EXISTS t1; 260---- CREATE ... SELECT (MyISAM, 0 row) ---- 261# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=ANONYMOUS 262SET GTID_NEXT = 'ANONYMOUS'; 263[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 264include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 265include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 266[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 267include/assert.inc [No warning or error should be generated.] 268include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 269include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 270ROLLBACK; 271SET GTID_NEXT = 'AUTOMATIC'; 272include/assert.inc [Both counters should be 0] 273DROP TABLE IF EXISTS t1; 274---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 275# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=ANONYMOUS 276SET GTID_NEXT = 'ANONYMOUS'; 277BEGIN; INSERT INTO t0 VALUES (1);; 278[START] CREATE TABLE t1 (a INT) SELECT 1; 279include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 280include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 281[END] CREATE TABLE t1 (a INT) SELECT 1; 282include/assert.inc [No warning or error should be generated.] 283include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 284include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 285ROLLBACK; 286SET GTID_NEXT = 'AUTOMATIC'; 287include/assert.inc [Both counters should be 0] 288DROP TABLE IF EXISTS t1; 289---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 290# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=ANONYMOUS 291SET GTID_NEXT = 'ANONYMOUS'; 292BEGIN; INSERT INTO t0 VALUES (1);; 293[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 294include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 295include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 296[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 297include/assert.inc [No warning or error should be generated.] 298include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 299include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 300ROLLBACK; 301SET GTID_NEXT = 'AUTOMATIC'; 302include/assert.inc [Both counters should be 0] 303DROP TABLE IF EXISTS t1; 304---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 305# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=ANONYMOUS 306SET GTID_NEXT = 'ANONYMOUS'; 307BEGIN; INSERT INTO t0 VALUES (1);; 308[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 309include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 310include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 311[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 312include/assert.inc [No warning or error should be generated.] 313include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 314include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 315ROLLBACK; 316SET GTID_NEXT = 'AUTOMATIC'; 317include/assert.inc [Both counters should be 0] 318DROP TABLE IF EXISTS t1; 319---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 320# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=ANONYMOUS 321SET GTID_NEXT = 'ANONYMOUS'; 322BEGIN; INSERT INTO t0 VALUES (1);; 323[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 324include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 325include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 326[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 327include/assert.inc [No warning or error should be generated.] 328include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 329include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 330ROLLBACK; 331SET GTID_NEXT = 'AUTOMATIC'; 332include/assert.inc [Both counters should be 0] 333DROP TABLE IF EXISTS t1; 334---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 335# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=ANONYMOUS 336SET GTID_NEXT = 'ANONYMOUS'; 337BEGIN; INSERT INTO t0 VALUES (1);; 338[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 339include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 340include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 341[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 342include/assert.inc [No warning or error should be generated.] 343include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 344include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 345ROLLBACK; 346SET GTID_NEXT = 'AUTOMATIC'; 347include/assert.inc [Both counters should be 0] 348DROP TABLE IF EXISTS t1; 349DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 350######## ENFORCE_GTID_CONSISTENCY=OFF GTID_MODE=ON_PERMISSIVE GTID_NEXT=GTID ######## 351CREATE TABLE t0 (a INT) ENGINE = InnoDB; 352CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 353CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 354CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 355CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 356INSERT INTO nonempty_innodb VALUES (1); 357INSERT INTO nonempty_myisam VALUES (1); 358---- CREATE ... SELECT (value, 1 row) ---- 359# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=GTID 360SET GTID_NEXT = 'GTID'; 361error ER_GTID_UNSAFE_CREATE_SELECT 362CREATE TABLE t1 (a INT) SELECT 1; 363ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 364include/assert.inc [One warning/error should be generated.] 365include/assert.inc [It should be an Error, not a Warning.] 366include/assert.inc [Text should be "violates GTID consistency"] 367include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 368include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 369ROLLBACK; 370SET GTID_NEXT = 'AUTOMATIC'; 371include/assert.inc [Both counters should be 0] 372DROP TABLE IF EXISTS t1; 373Warnings: 374Note 1051 Unknown table 'test.t1' 375---- CREATE ... SELECT (InnoDB, 1 row) ---- 376# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=GTID 377SET GTID_NEXT = 'GTID'; 378error ER_GTID_UNSAFE_CREATE_SELECT 379CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 380ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 381include/assert.inc [One warning/error should be generated.] 382include/assert.inc [It should be an Error, not a Warning.] 383include/assert.inc [Text should be "violates GTID consistency"] 384include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 385include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 386ROLLBACK; 387SET GTID_NEXT = 'AUTOMATIC'; 388include/assert.inc [Both counters should be 0] 389DROP TABLE IF EXISTS t1; 390Warnings: 391Note 1051 Unknown table 'test.t1' 392---- CREATE ... SELECT (MyISAM, 1 row) ---- 393# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=GTID 394SET GTID_NEXT = 'GTID'; 395error ER_GTID_UNSAFE_CREATE_SELECT 396CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 397ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 398include/assert.inc [One warning/error should be generated.] 399include/assert.inc [It should be an Error, not a Warning.] 400include/assert.inc [Text should be "violates GTID consistency"] 401include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 402include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 403ROLLBACK; 404SET GTID_NEXT = 'AUTOMATIC'; 405include/assert.inc [Both counters should be 0] 406DROP TABLE IF EXISTS t1; 407Warnings: 408Note 1051 Unknown table 'test.t1' 409---- CREATE ... SELECT (InnoDB, 0 row) ---- 410# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=GTID 411SET GTID_NEXT = 'GTID'; 412error ER_GTID_UNSAFE_CREATE_SELECT 413CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 414ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 415include/assert.inc [One warning/error should be generated.] 416include/assert.inc [It should be an Error, not a Warning.] 417include/assert.inc [Text should be "violates GTID consistency"] 418include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 419include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 420ROLLBACK; 421SET GTID_NEXT = 'AUTOMATIC'; 422include/assert.inc [Both counters should be 0] 423DROP TABLE IF EXISTS t1; 424Warnings: 425Note 1051 Unknown table 'test.t1' 426---- CREATE ... SELECT (MyISAM, 0 row) ---- 427# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=GTID 428SET GTID_NEXT = 'GTID'; 429error ER_GTID_UNSAFE_CREATE_SELECT 430CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 431ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 432include/assert.inc [One warning/error should be generated.] 433include/assert.inc [It should be an Error, not a Warning.] 434include/assert.inc [Text should be "violates GTID consistency"] 435include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 436include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 437ROLLBACK; 438SET GTID_NEXT = 'AUTOMATIC'; 439include/assert.inc [Both counters should be 0] 440DROP TABLE IF EXISTS t1; 441Warnings: 442Note 1051 Unknown table 'test.t1' 443---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 444# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=GTID 445SET GTID_NEXT = 'GTID'; 446BEGIN; INSERT INTO t0 VALUES (1);; 447error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 448CREATE TABLE t1 (a INT) SELECT 1; 449ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 450include/assert.inc [One warning/error should be generated.] 451include/assert.inc [It should be an Error, not a Warning.] 452include/assert.inc [Text should be "violates GTID consistency"] 453include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 454include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 455ROLLBACK; 456SET GTID_NEXT = 'AUTOMATIC'; 457include/assert.inc [Both counters should be 0] 458DROP TABLE IF EXISTS t1; 459Warnings: 460Note 1051 Unknown table 'test.t1' 461---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 462# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=GTID 463SET GTID_NEXT = 'GTID'; 464BEGIN; INSERT INTO t0 VALUES (1);; 465error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 466CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 467ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 468include/assert.inc [One warning/error should be generated.] 469include/assert.inc [It should be an Error, not a Warning.] 470include/assert.inc [Text should be "violates GTID consistency"] 471include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 472include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 473ROLLBACK; 474SET GTID_NEXT = 'AUTOMATIC'; 475include/assert.inc [Both counters should be 0] 476DROP TABLE IF EXISTS t1; 477Warnings: 478Note 1051 Unknown table 'test.t1' 479---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 480# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=GTID 481SET GTID_NEXT = 'GTID'; 482BEGIN; INSERT INTO t0 VALUES (1);; 483error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 484CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 485ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 486include/assert.inc [One warning/error should be generated.] 487include/assert.inc [It should be an Error, not a Warning.] 488include/assert.inc [Text should be "violates GTID consistency"] 489include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 490include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 491ROLLBACK; 492SET GTID_NEXT = 'AUTOMATIC'; 493include/assert.inc [Both counters should be 0] 494DROP TABLE IF EXISTS t1; 495Warnings: 496Note 1051 Unknown table 'test.t1' 497---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 498# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=GTID 499SET GTID_NEXT = 'GTID'; 500BEGIN; INSERT INTO t0 VALUES (1);; 501error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 502CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 503ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 504include/assert.inc [One warning/error should be generated.] 505include/assert.inc [It should be an Error, not a Warning.] 506include/assert.inc [Text should be "violates GTID consistency"] 507include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 508include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 509ROLLBACK; 510SET GTID_NEXT = 'AUTOMATIC'; 511include/assert.inc [Both counters should be 0] 512DROP TABLE IF EXISTS t1; 513Warnings: 514Note 1051 Unknown table 'test.t1' 515---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 516# enforce_gtid_consistency=0 gtid_mode=2 gtid_next=GTID 517SET GTID_NEXT = 'GTID'; 518BEGIN; INSERT INTO t0 VALUES (1);; 519error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 520CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 521ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 522include/assert.inc [One warning/error should be generated.] 523include/assert.inc [It should be an Error, not a Warning.] 524include/assert.inc [Text should be "violates GTID consistency"] 525include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 526include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 527ROLLBACK; 528SET GTID_NEXT = 'AUTOMATIC'; 529include/assert.inc [Both counters should be 0] 530DROP TABLE IF EXISTS t1; 531Warnings: 532Note 1051 Unknown table 'test.t1' 533DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 534SET GLOBAL GTID_MODE = 1; 535######## ENFORCE_GTID_CONSISTENCY=OFF GTID_MODE=OFF_PERMISSIVE GTID_NEXT=AUTOMATIC ######## 536CREATE TABLE t0 (a INT) ENGINE = InnoDB; 537CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 538CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 539CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 540CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 541INSERT INTO nonempty_innodb VALUES (1); 542INSERT INTO nonempty_myisam VALUES (1); 543---- CREATE ... SELECT (value, 1 row) ---- 544# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=AUTOMATIC 545SET GTID_NEXT = 'AUTOMATIC'; 546[START] CREATE TABLE t1 (a INT) SELECT 1; 547include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 548include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 549[END] CREATE TABLE t1 (a INT) SELECT 1; 550include/assert.inc [No warning or error should be generated.] 551include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 552include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 553ROLLBACK; 554SET GTID_NEXT = 'AUTOMATIC'; 555include/assert.inc [Both counters should be 0] 556DROP TABLE IF EXISTS t1; 557---- CREATE ... SELECT (InnoDB, 1 row) ---- 558# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=AUTOMATIC 559SET GTID_NEXT = 'AUTOMATIC'; 560[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 561include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 562include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 563[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 564include/assert.inc [No warning or error should be generated.] 565include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 566include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 567ROLLBACK; 568SET GTID_NEXT = 'AUTOMATIC'; 569include/assert.inc [Both counters should be 0] 570DROP TABLE IF EXISTS t1; 571---- CREATE ... SELECT (MyISAM, 1 row) ---- 572# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=AUTOMATIC 573SET GTID_NEXT = 'AUTOMATIC'; 574[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 575include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 576include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 577[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 578include/assert.inc [No warning or error should be generated.] 579include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 580include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 581ROLLBACK; 582SET GTID_NEXT = 'AUTOMATIC'; 583include/assert.inc [Both counters should be 0] 584DROP TABLE IF EXISTS t1; 585---- CREATE ... SELECT (InnoDB, 0 row) ---- 586# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=AUTOMATIC 587SET GTID_NEXT = 'AUTOMATIC'; 588[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 589include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 590include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 591[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 592include/assert.inc [No warning or error should be generated.] 593include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 594include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 595ROLLBACK; 596SET GTID_NEXT = 'AUTOMATIC'; 597include/assert.inc [Both counters should be 0] 598DROP TABLE IF EXISTS t1; 599---- CREATE ... SELECT (MyISAM, 0 row) ---- 600# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=AUTOMATIC 601SET GTID_NEXT = 'AUTOMATIC'; 602[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 603include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 604include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 605[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 606include/assert.inc [No warning or error should be generated.] 607include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 608include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 609ROLLBACK; 610SET GTID_NEXT = 'AUTOMATIC'; 611include/assert.inc [Both counters should be 0] 612DROP TABLE IF EXISTS t1; 613---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 614# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=AUTOMATIC 615SET GTID_NEXT = 'AUTOMATIC'; 616BEGIN; INSERT INTO t0 VALUES (1);; 617[START] CREATE TABLE t1 (a INT) SELECT 1; 618include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 619include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 620[END] CREATE TABLE t1 (a INT) SELECT 1; 621include/assert.inc [No warning or error should be generated.] 622include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 623include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 624ROLLBACK; 625SET GTID_NEXT = 'AUTOMATIC'; 626include/assert.inc [Both counters should be 0] 627DROP TABLE IF EXISTS t1; 628---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 629# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=AUTOMATIC 630SET GTID_NEXT = 'AUTOMATIC'; 631BEGIN; INSERT INTO t0 VALUES (1);; 632[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 633include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 634include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 635[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 636include/assert.inc [No warning or error should be generated.] 637include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 638include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 639ROLLBACK; 640SET GTID_NEXT = 'AUTOMATIC'; 641include/assert.inc [Both counters should be 0] 642DROP TABLE IF EXISTS t1; 643---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 644# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=AUTOMATIC 645SET GTID_NEXT = 'AUTOMATIC'; 646BEGIN; INSERT INTO t0 VALUES (1);; 647[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 648include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 649include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 650[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 651include/assert.inc [No warning or error should be generated.] 652include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 653include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 654ROLLBACK; 655SET GTID_NEXT = 'AUTOMATIC'; 656include/assert.inc [Both counters should be 0] 657DROP TABLE IF EXISTS t1; 658---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 659# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=AUTOMATIC 660SET GTID_NEXT = 'AUTOMATIC'; 661BEGIN; INSERT INTO t0 VALUES (1);; 662[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 663include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 664include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 665[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 666include/assert.inc [No warning or error should be generated.] 667include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 668include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 669ROLLBACK; 670SET GTID_NEXT = 'AUTOMATIC'; 671include/assert.inc [Both counters should be 0] 672DROP TABLE IF EXISTS t1; 673---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 674# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=AUTOMATIC 675SET GTID_NEXT = 'AUTOMATIC'; 676BEGIN; INSERT INTO t0 VALUES (1);; 677[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 678include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 679include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 680[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 681include/assert.inc [No warning or error should be generated.] 682include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 683include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 684ROLLBACK; 685SET GTID_NEXT = 'AUTOMATIC'; 686include/assert.inc [Both counters should be 0] 687DROP TABLE IF EXISTS t1; 688DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 689######## ENFORCE_GTID_CONSISTENCY=OFF GTID_MODE=OFF_PERMISSIVE GTID_NEXT=ANONYMOUS ######## 690CREATE TABLE t0 (a INT) ENGINE = InnoDB; 691CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 692CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 693CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 694CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 695INSERT INTO nonempty_innodb VALUES (1); 696INSERT INTO nonempty_myisam VALUES (1); 697---- CREATE ... SELECT (value, 1 row) ---- 698# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=ANONYMOUS 699SET GTID_NEXT = 'ANONYMOUS'; 700[START] CREATE TABLE t1 (a INT) SELECT 1; 701include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 702include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 703[END] CREATE TABLE t1 (a INT) SELECT 1; 704include/assert.inc [No warning or error should be generated.] 705include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 706include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 707ROLLBACK; 708SET GTID_NEXT = 'AUTOMATIC'; 709include/assert.inc [Both counters should be 0] 710DROP TABLE IF EXISTS t1; 711---- CREATE ... SELECT (InnoDB, 1 row) ---- 712# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=ANONYMOUS 713SET GTID_NEXT = 'ANONYMOUS'; 714[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 715include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 716include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 717[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 718include/assert.inc [No warning or error should be generated.] 719include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 720include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 721ROLLBACK; 722SET GTID_NEXT = 'AUTOMATIC'; 723include/assert.inc [Both counters should be 0] 724DROP TABLE IF EXISTS t1; 725---- CREATE ... SELECT (MyISAM, 1 row) ---- 726# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=ANONYMOUS 727SET GTID_NEXT = 'ANONYMOUS'; 728[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 729include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 730include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 731[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 732include/assert.inc [No warning or error should be generated.] 733include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 734include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 735ROLLBACK; 736SET GTID_NEXT = 'AUTOMATIC'; 737include/assert.inc [Both counters should be 0] 738DROP TABLE IF EXISTS t1; 739---- CREATE ... SELECT (InnoDB, 0 row) ---- 740# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=ANONYMOUS 741SET GTID_NEXT = 'ANONYMOUS'; 742[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 743include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 744include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 745[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 746include/assert.inc [No warning or error should be generated.] 747include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 748include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 749ROLLBACK; 750SET GTID_NEXT = 'AUTOMATIC'; 751include/assert.inc [Both counters should be 0] 752DROP TABLE IF EXISTS t1; 753---- CREATE ... SELECT (MyISAM, 0 row) ---- 754# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=ANONYMOUS 755SET GTID_NEXT = 'ANONYMOUS'; 756[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 757include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 758include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 759[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 760include/assert.inc [No warning or error should be generated.] 761include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 762include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 763ROLLBACK; 764SET GTID_NEXT = 'AUTOMATIC'; 765include/assert.inc [Both counters should be 0] 766DROP TABLE IF EXISTS t1; 767---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 768# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=ANONYMOUS 769SET GTID_NEXT = 'ANONYMOUS'; 770BEGIN; INSERT INTO t0 VALUES (1);; 771[START] CREATE TABLE t1 (a INT) SELECT 1; 772include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 773include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 774[END] CREATE TABLE t1 (a INT) SELECT 1; 775include/assert.inc [No warning or error should be generated.] 776include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 777include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 778ROLLBACK; 779SET GTID_NEXT = 'AUTOMATIC'; 780include/assert.inc [Both counters should be 0] 781DROP TABLE IF EXISTS t1; 782---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 783# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=ANONYMOUS 784SET GTID_NEXT = 'ANONYMOUS'; 785BEGIN; INSERT INTO t0 VALUES (1);; 786[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 787include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 788include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 789[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 790include/assert.inc [No warning or error should be generated.] 791include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 792include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 793ROLLBACK; 794SET GTID_NEXT = 'AUTOMATIC'; 795include/assert.inc [Both counters should be 0] 796DROP TABLE IF EXISTS t1; 797---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 798# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=ANONYMOUS 799SET GTID_NEXT = 'ANONYMOUS'; 800BEGIN; INSERT INTO t0 VALUES (1);; 801[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 802include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 803include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 804[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 805include/assert.inc [No warning or error should be generated.] 806include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 807include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 808ROLLBACK; 809SET GTID_NEXT = 'AUTOMATIC'; 810include/assert.inc [Both counters should be 0] 811DROP TABLE IF EXISTS t1; 812---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 813# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=ANONYMOUS 814SET GTID_NEXT = 'ANONYMOUS'; 815BEGIN; INSERT INTO t0 VALUES (1);; 816[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 817include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 818include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 819[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 820include/assert.inc [No warning or error should be generated.] 821include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 822include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 823ROLLBACK; 824SET GTID_NEXT = 'AUTOMATIC'; 825include/assert.inc [Both counters should be 0] 826DROP TABLE IF EXISTS t1; 827---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 828# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=ANONYMOUS 829SET GTID_NEXT = 'ANONYMOUS'; 830BEGIN; INSERT INTO t0 VALUES (1);; 831[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 832include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 833include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 834[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 835include/assert.inc [No warning or error should be generated.] 836include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 837include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 838ROLLBACK; 839SET GTID_NEXT = 'AUTOMATIC'; 840include/assert.inc [Both counters should be 0] 841DROP TABLE IF EXISTS t1; 842DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 843######## ENFORCE_GTID_CONSISTENCY=OFF GTID_MODE=OFF_PERMISSIVE GTID_NEXT=GTID ######## 844CREATE TABLE t0 (a INT) ENGINE = InnoDB; 845CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 846CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 847CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 848CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 849INSERT INTO nonempty_innodb VALUES (1); 850INSERT INTO nonempty_myisam VALUES (1); 851---- CREATE ... SELECT (value, 1 row) ---- 852# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=GTID 853SET GTID_NEXT = 'GTID'; 854error ER_GTID_UNSAFE_CREATE_SELECT 855CREATE TABLE t1 (a INT) SELECT 1; 856ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 857include/assert.inc [One warning/error should be generated.] 858include/assert.inc [It should be an Error, not a Warning.] 859include/assert.inc [Text should be "violates GTID consistency"] 860include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 861include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 862ROLLBACK; 863SET GTID_NEXT = 'AUTOMATIC'; 864include/assert.inc [Both counters should be 0] 865DROP TABLE IF EXISTS t1; 866Warnings: 867Note 1051 Unknown table 'test.t1' 868---- CREATE ... SELECT (InnoDB, 1 row) ---- 869# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=GTID 870SET GTID_NEXT = 'GTID'; 871error ER_GTID_UNSAFE_CREATE_SELECT 872CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 873ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 874include/assert.inc [One warning/error should be generated.] 875include/assert.inc [It should be an Error, not a Warning.] 876include/assert.inc [Text should be "violates GTID consistency"] 877include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 878include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 879ROLLBACK; 880SET GTID_NEXT = 'AUTOMATIC'; 881include/assert.inc [Both counters should be 0] 882DROP TABLE IF EXISTS t1; 883Warnings: 884Note 1051 Unknown table 'test.t1' 885---- CREATE ... SELECT (MyISAM, 1 row) ---- 886# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=GTID 887SET GTID_NEXT = 'GTID'; 888error ER_GTID_UNSAFE_CREATE_SELECT 889CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 890ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 891include/assert.inc [One warning/error should be generated.] 892include/assert.inc [It should be an Error, not a Warning.] 893include/assert.inc [Text should be "violates GTID consistency"] 894include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 895include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 896ROLLBACK; 897SET GTID_NEXT = 'AUTOMATIC'; 898include/assert.inc [Both counters should be 0] 899DROP TABLE IF EXISTS t1; 900Warnings: 901Note 1051 Unknown table 'test.t1' 902---- CREATE ... SELECT (InnoDB, 0 row) ---- 903# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=GTID 904SET GTID_NEXT = 'GTID'; 905error ER_GTID_UNSAFE_CREATE_SELECT 906CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 907ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 908include/assert.inc [One warning/error should be generated.] 909include/assert.inc [It should be an Error, not a Warning.] 910include/assert.inc [Text should be "violates GTID consistency"] 911include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 912include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 913ROLLBACK; 914SET GTID_NEXT = 'AUTOMATIC'; 915include/assert.inc [Both counters should be 0] 916DROP TABLE IF EXISTS t1; 917Warnings: 918Note 1051 Unknown table 'test.t1' 919---- CREATE ... SELECT (MyISAM, 0 row) ---- 920# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=GTID 921SET GTID_NEXT = 'GTID'; 922error ER_GTID_UNSAFE_CREATE_SELECT 923CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 924ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 925include/assert.inc [One warning/error should be generated.] 926include/assert.inc [It should be an Error, not a Warning.] 927include/assert.inc [Text should be "violates GTID consistency"] 928include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 929include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 930ROLLBACK; 931SET GTID_NEXT = 'AUTOMATIC'; 932include/assert.inc [Both counters should be 0] 933DROP TABLE IF EXISTS t1; 934Warnings: 935Note 1051 Unknown table 'test.t1' 936---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 937# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=GTID 938SET GTID_NEXT = 'GTID'; 939BEGIN; INSERT INTO t0 VALUES (1);; 940error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 941CREATE TABLE t1 (a INT) SELECT 1; 942ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 943include/assert.inc [One warning/error should be generated.] 944include/assert.inc [It should be an Error, not a Warning.] 945include/assert.inc [Text should be "violates GTID consistency"] 946include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 947include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 948ROLLBACK; 949SET GTID_NEXT = 'AUTOMATIC'; 950include/assert.inc [Both counters should be 0] 951DROP TABLE IF EXISTS t1; 952Warnings: 953Note 1051 Unknown table 'test.t1' 954---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 955# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=GTID 956SET GTID_NEXT = 'GTID'; 957BEGIN; INSERT INTO t0 VALUES (1);; 958error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 959CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 960ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 961include/assert.inc [One warning/error should be generated.] 962include/assert.inc [It should be an Error, not a Warning.] 963include/assert.inc [Text should be "violates GTID consistency"] 964include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 965include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 966ROLLBACK; 967SET GTID_NEXT = 'AUTOMATIC'; 968include/assert.inc [Both counters should be 0] 969DROP TABLE IF EXISTS t1; 970Warnings: 971Note 1051 Unknown table 'test.t1' 972---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 973# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=GTID 974SET GTID_NEXT = 'GTID'; 975BEGIN; INSERT INTO t0 VALUES (1);; 976error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 977CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 978ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 979include/assert.inc [One warning/error should be generated.] 980include/assert.inc [It should be an Error, not a Warning.] 981include/assert.inc [Text should be "violates GTID consistency"] 982include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 983include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 984ROLLBACK; 985SET GTID_NEXT = 'AUTOMATIC'; 986include/assert.inc [Both counters should be 0] 987DROP TABLE IF EXISTS t1; 988Warnings: 989Note 1051 Unknown table 'test.t1' 990---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 991# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=GTID 992SET GTID_NEXT = 'GTID'; 993BEGIN; INSERT INTO t0 VALUES (1);; 994error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 995CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 996ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 997include/assert.inc [One warning/error should be generated.] 998include/assert.inc [It should be an Error, not a Warning.] 999include/assert.inc [Text should be "violates GTID consistency"] 1000include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1001include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1002ROLLBACK; 1003SET GTID_NEXT = 'AUTOMATIC'; 1004include/assert.inc [Both counters should be 0] 1005DROP TABLE IF EXISTS t1; 1006Warnings: 1007Note 1051 Unknown table 'test.t1' 1008---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 1009# enforce_gtid_consistency=0 gtid_mode=1 gtid_next=GTID 1010SET GTID_NEXT = 'GTID'; 1011BEGIN; INSERT INTO t0 VALUES (1);; 1012error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 1013CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1014ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 1015include/assert.inc [One warning/error should be generated.] 1016include/assert.inc [It should be an Error, not a Warning.] 1017include/assert.inc [Text should be "violates GTID consistency"] 1018include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1019include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1020ROLLBACK; 1021SET GTID_NEXT = 'AUTOMATIC'; 1022include/assert.inc [Both counters should be 0] 1023DROP TABLE IF EXISTS t1; 1024Warnings: 1025Note 1051 Unknown table 'test.t1' 1026DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 1027SET GLOBAL GTID_MODE = 0; 1028######## ENFORCE_GTID_CONSISTENCY=OFF GTID_MODE=OFF GTID_NEXT=AUTOMATIC ######## 1029CREATE TABLE t0 (a INT) ENGINE = InnoDB; 1030CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 1031CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 1032CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 1033CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 1034INSERT INTO nonempty_innodb VALUES (1); 1035INSERT INTO nonempty_myisam VALUES (1); 1036---- CREATE ... SELECT (value, 1 row) ---- 1037# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=AUTOMATIC 1038SET GTID_NEXT = 'AUTOMATIC'; 1039[START] CREATE TABLE t1 (a INT) SELECT 1; 1040include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1041include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1042[END] CREATE TABLE t1 (a INT) SELECT 1; 1043include/assert.inc [No warning or error should be generated.] 1044include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1045include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1046ROLLBACK; 1047SET GTID_NEXT = 'AUTOMATIC'; 1048include/assert.inc [Both counters should be 0] 1049DROP TABLE IF EXISTS t1; 1050---- CREATE ... SELECT (InnoDB, 1 row) ---- 1051# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=AUTOMATIC 1052SET GTID_NEXT = 'AUTOMATIC'; 1053[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1054include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1055include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1056[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1057include/assert.inc [No warning or error should be generated.] 1058include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1059include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1060ROLLBACK; 1061SET GTID_NEXT = 'AUTOMATIC'; 1062include/assert.inc [Both counters should be 0] 1063DROP TABLE IF EXISTS t1; 1064---- CREATE ... SELECT (MyISAM, 1 row) ---- 1065# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=AUTOMATIC 1066SET GTID_NEXT = 'AUTOMATIC'; 1067[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1068include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1069include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1070[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1071include/assert.inc [No warning or error should be generated.] 1072include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1073include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1074ROLLBACK; 1075SET GTID_NEXT = 'AUTOMATIC'; 1076include/assert.inc [Both counters should be 0] 1077DROP TABLE IF EXISTS t1; 1078---- CREATE ... SELECT (InnoDB, 0 row) ---- 1079# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=AUTOMATIC 1080SET GTID_NEXT = 'AUTOMATIC'; 1081[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1082include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1083include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1084[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1085include/assert.inc [No warning or error should be generated.] 1086include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1087include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1088ROLLBACK; 1089SET GTID_NEXT = 'AUTOMATIC'; 1090include/assert.inc [Both counters should be 0] 1091DROP TABLE IF EXISTS t1; 1092---- CREATE ... SELECT (MyISAM, 0 row) ---- 1093# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=AUTOMATIC 1094SET GTID_NEXT = 'AUTOMATIC'; 1095[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1096include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1097include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1098[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1099include/assert.inc [No warning or error should be generated.] 1100include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1101include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1102ROLLBACK; 1103SET GTID_NEXT = 'AUTOMATIC'; 1104include/assert.inc [Both counters should be 0] 1105DROP TABLE IF EXISTS t1; 1106---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 1107# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=AUTOMATIC 1108SET GTID_NEXT = 'AUTOMATIC'; 1109BEGIN; INSERT INTO t0 VALUES (1);; 1110[START] CREATE TABLE t1 (a INT) SELECT 1; 1111include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1112include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1113[END] CREATE TABLE t1 (a INT) SELECT 1; 1114include/assert.inc [No warning or error should be generated.] 1115include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1116include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1117ROLLBACK; 1118SET GTID_NEXT = 'AUTOMATIC'; 1119include/assert.inc [Both counters should be 0] 1120DROP TABLE IF EXISTS t1; 1121---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 1122# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=AUTOMATIC 1123SET GTID_NEXT = 'AUTOMATIC'; 1124BEGIN; INSERT INTO t0 VALUES (1);; 1125[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1126include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1127include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1128[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1129include/assert.inc [No warning or error should be generated.] 1130include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1131include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1132ROLLBACK; 1133SET GTID_NEXT = 'AUTOMATIC'; 1134include/assert.inc [Both counters should be 0] 1135DROP TABLE IF EXISTS t1; 1136---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 1137# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=AUTOMATIC 1138SET GTID_NEXT = 'AUTOMATIC'; 1139BEGIN; INSERT INTO t0 VALUES (1);; 1140[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1141include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1142include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1143[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1144include/assert.inc [No warning or error should be generated.] 1145include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1146include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1147ROLLBACK; 1148SET GTID_NEXT = 'AUTOMATIC'; 1149include/assert.inc [Both counters should be 0] 1150DROP TABLE IF EXISTS t1; 1151---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 1152# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=AUTOMATIC 1153SET GTID_NEXT = 'AUTOMATIC'; 1154BEGIN; INSERT INTO t0 VALUES (1);; 1155[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1156include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1157include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1158[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1159include/assert.inc [No warning or error should be generated.] 1160include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1161include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1162ROLLBACK; 1163SET GTID_NEXT = 'AUTOMATIC'; 1164include/assert.inc [Both counters should be 0] 1165DROP TABLE IF EXISTS t1; 1166---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 1167# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=AUTOMATIC 1168SET GTID_NEXT = 'AUTOMATIC'; 1169BEGIN; INSERT INTO t0 VALUES (1);; 1170[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1171include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1172include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1173[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1174include/assert.inc [No warning or error should be generated.] 1175include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1176include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1177ROLLBACK; 1178SET GTID_NEXT = 'AUTOMATIC'; 1179include/assert.inc [Both counters should be 0] 1180DROP TABLE IF EXISTS t1; 1181DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 1182######## ENFORCE_GTID_CONSISTENCY=OFF GTID_MODE=OFF GTID_NEXT=ANONYMOUS ######## 1183CREATE TABLE t0 (a INT) ENGINE = InnoDB; 1184CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 1185CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 1186CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 1187CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 1188INSERT INTO nonempty_innodb VALUES (1); 1189INSERT INTO nonempty_myisam VALUES (1); 1190---- CREATE ... SELECT (value, 1 row) ---- 1191# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=ANONYMOUS 1192SET GTID_NEXT = 'ANONYMOUS'; 1193[START] CREATE TABLE t1 (a INT) SELECT 1; 1194include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1195include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1196[END] CREATE TABLE t1 (a INT) SELECT 1; 1197include/assert.inc [No warning or error should be generated.] 1198include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1199include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1200ROLLBACK; 1201SET GTID_NEXT = 'AUTOMATIC'; 1202include/assert.inc [Both counters should be 0] 1203DROP TABLE IF EXISTS t1; 1204---- CREATE ... SELECT (InnoDB, 1 row) ---- 1205# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=ANONYMOUS 1206SET GTID_NEXT = 'ANONYMOUS'; 1207[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1208include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1209include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1210[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1211include/assert.inc [No warning or error should be generated.] 1212include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1213include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1214ROLLBACK; 1215SET GTID_NEXT = 'AUTOMATIC'; 1216include/assert.inc [Both counters should be 0] 1217DROP TABLE IF EXISTS t1; 1218---- CREATE ... SELECT (MyISAM, 1 row) ---- 1219# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=ANONYMOUS 1220SET GTID_NEXT = 'ANONYMOUS'; 1221[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1222include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1223include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1224[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1225include/assert.inc [No warning or error should be generated.] 1226include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1227include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1228ROLLBACK; 1229SET GTID_NEXT = 'AUTOMATIC'; 1230include/assert.inc [Both counters should be 0] 1231DROP TABLE IF EXISTS t1; 1232---- CREATE ... SELECT (InnoDB, 0 row) ---- 1233# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=ANONYMOUS 1234SET GTID_NEXT = 'ANONYMOUS'; 1235[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1236include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1237include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1238[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1239include/assert.inc [No warning or error should be generated.] 1240include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1241include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1242ROLLBACK; 1243SET GTID_NEXT = 'AUTOMATIC'; 1244include/assert.inc [Both counters should be 0] 1245DROP TABLE IF EXISTS t1; 1246---- CREATE ... SELECT (MyISAM, 0 row) ---- 1247# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=ANONYMOUS 1248SET GTID_NEXT = 'ANONYMOUS'; 1249[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1250include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1251include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1252[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1253include/assert.inc [No warning or error should be generated.] 1254include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1255include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1256ROLLBACK; 1257SET GTID_NEXT = 'AUTOMATIC'; 1258include/assert.inc [Both counters should be 0] 1259DROP TABLE IF EXISTS t1; 1260---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 1261# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=ANONYMOUS 1262SET GTID_NEXT = 'ANONYMOUS'; 1263BEGIN; INSERT INTO t0 VALUES (1);; 1264[START] CREATE TABLE t1 (a INT) SELECT 1; 1265include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1266include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1267[END] CREATE TABLE t1 (a INT) SELECT 1; 1268include/assert.inc [No warning or error should be generated.] 1269include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1270include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1271ROLLBACK; 1272SET GTID_NEXT = 'AUTOMATIC'; 1273include/assert.inc [Both counters should be 0] 1274DROP TABLE IF EXISTS t1; 1275---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 1276# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=ANONYMOUS 1277SET GTID_NEXT = 'ANONYMOUS'; 1278BEGIN; INSERT INTO t0 VALUES (1);; 1279[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1280include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1281include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1282[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1283include/assert.inc [No warning or error should be generated.] 1284include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1285include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1286ROLLBACK; 1287SET GTID_NEXT = 'AUTOMATIC'; 1288include/assert.inc [Both counters should be 0] 1289DROP TABLE IF EXISTS t1; 1290---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 1291# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=ANONYMOUS 1292SET GTID_NEXT = 'ANONYMOUS'; 1293BEGIN; INSERT INTO t0 VALUES (1);; 1294[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1295include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1296include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1297[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1298include/assert.inc [No warning or error should be generated.] 1299include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1300include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1301ROLLBACK; 1302SET GTID_NEXT = 'AUTOMATIC'; 1303include/assert.inc [Both counters should be 0] 1304DROP TABLE IF EXISTS t1; 1305---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 1306# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=ANONYMOUS 1307SET GTID_NEXT = 'ANONYMOUS'; 1308BEGIN; INSERT INTO t0 VALUES (1);; 1309[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1310include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1311include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1312[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1313include/assert.inc [No warning or error should be generated.] 1314include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1315include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1316ROLLBACK; 1317SET GTID_NEXT = 'AUTOMATIC'; 1318include/assert.inc [Both counters should be 0] 1319DROP TABLE IF EXISTS t1; 1320---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 1321# enforce_gtid_consistency=0 gtid_mode=0 gtid_next=ANONYMOUS 1322SET GTID_NEXT = 'ANONYMOUS'; 1323BEGIN; INSERT INTO t0 VALUES (1);; 1324[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1325include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1326include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 1327[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1328include/assert.inc [No warning or error should be generated.] 1329include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1330include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1331ROLLBACK; 1332SET GTID_NEXT = 'AUTOMATIC'; 1333include/assert.inc [Both counters should be 0] 1334DROP TABLE IF EXISTS t1; 1335DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 1336SET GLOBAL ENFORCE_GTID_CONSISTENCY = 1; 1337SET GLOBAL GTID_MODE = OFF_PERMISSIVE; 1338SET GLOBAL GTID_MODE = ON_PERMISSIVE; 1339SET GLOBAL GTID_MODE = ON; 1340SET GLOBAL GTID_MODE = 3; 1341######## ENFORCE_GTID_CONSISTENCY=ERROR GTID_MODE=ON GTID_NEXT=AUTOMATIC ######## 1342CREATE TABLE t0 (a INT) ENGINE = InnoDB; 1343CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 1344CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 1345CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 1346CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 1347INSERT INTO nonempty_innodb VALUES (1); 1348INSERT INTO nonempty_myisam VALUES (1); 1349---- CREATE ... SELECT (value, 1 row) ---- 1350# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=AUTOMATIC 1351SET GTID_NEXT = 'AUTOMATIC'; 1352error ER_GTID_UNSAFE_CREATE_SELECT 1353CREATE TABLE t1 (a INT) SELECT 1; 1354ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1355include/assert.inc [One warning/error should be generated.] 1356include/assert.inc [It should be an Error, not a Warning.] 1357include/assert.inc [Text should be "violates GTID consistency"] 1358include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1359include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1360ROLLBACK; 1361SET GTID_NEXT = 'AUTOMATIC'; 1362include/assert.inc [Both counters should be 0] 1363DROP TABLE IF EXISTS t1; 1364Warnings: 1365Note 1051 Unknown table 'test.t1' 1366---- CREATE ... SELECT (InnoDB, 1 row) ---- 1367# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=AUTOMATIC 1368SET GTID_NEXT = 'AUTOMATIC'; 1369error ER_GTID_UNSAFE_CREATE_SELECT 1370CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1371ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1372include/assert.inc [One warning/error should be generated.] 1373include/assert.inc [It should be an Error, not a Warning.] 1374include/assert.inc [Text should be "violates GTID consistency"] 1375include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1376include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1377ROLLBACK; 1378SET GTID_NEXT = 'AUTOMATIC'; 1379include/assert.inc [Both counters should be 0] 1380DROP TABLE IF EXISTS t1; 1381Warnings: 1382Note 1051 Unknown table 'test.t1' 1383---- CREATE ... SELECT (MyISAM, 1 row) ---- 1384# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=AUTOMATIC 1385SET GTID_NEXT = 'AUTOMATIC'; 1386error ER_GTID_UNSAFE_CREATE_SELECT 1387CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1388ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1389include/assert.inc [One warning/error should be generated.] 1390include/assert.inc [It should be an Error, not a Warning.] 1391include/assert.inc [Text should be "violates GTID consistency"] 1392include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1393include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1394ROLLBACK; 1395SET GTID_NEXT = 'AUTOMATIC'; 1396include/assert.inc [Both counters should be 0] 1397DROP TABLE IF EXISTS t1; 1398Warnings: 1399Note 1051 Unknown table 'test.t1' 1400---- CREATE ... SELECT (InnoDB, 0 row) ---- 1401# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=AUTOMATIC 1402SET GTID_NEXT = 'AUTOMATIC'; 1403error ER_GTID_UNSAFE_CREATE_SELECT 1404CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1405ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1406include/assert.inc [One warning/error should be generated.] 1407include/assert.inc [It should be an Error, not a Warning.] 1408include/assert.inc [Text should be "violates GTID consistency"] 1409include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1410include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1411ROLLBACK; 1412SET GTID_NEXT = 'AUTOMATIC'; 1413include/assert.inc [Both counters should be 0] 1414DROP TABLE IF EXISTS t1; 1415Warnings: 1416Note 1051 Unknown table 'test.t1' 1417---- CREATE ... SELECT (MyISAM, 0 row) ---- 1418# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=AUTOMATIC 1419SET GTID_NEXT = 'AUTOMATIC'; 1420error ER_GTID_UNSAFE_CREATE_SELECT 1421CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1422ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1423include/assert.inc [One warning/error should be generated.] 1424include/assert.inc [It should be an Error, not a Warning.] 1425include/assert.inc [Text should be "violates GTID consistency"] 1426include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1427include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1428ROLLBACK; 1429SET GTID_NEXT = 'AUTOMATIC'; 1430include/assert.inc [Both counters should be 0] 1431DROP TABLE IF EXISTS t1; 1432Warnings: 1433Note 1051 Unknown table 'test.t1' 1434---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 1435# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=AUTOMATIC 1436SET GTID_NEXT = 'AUTOMATIC'; 1437BEGIN; INSERT INTO t0 VALUES (1);; 1438error ER_GTID_UNSAFE_CREATE_SELECT 1439CREATE TABLE t1 (a INT) SELECT 1; 1440ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1441include/assert.inc [One warning/error should be generated.] 1442include/assert.inc [It should be an Error, not a Warning.] 1443include/assert.inc [Text should be "violates GTID consistency"] 1444include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1445include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1446ROLLBACK; 1447SET GTID_NEXT = 'AUTOMATIC'; 1448include/assert.inc [Both counters should be 0] 1449DROP TABLE IF EXISTS t1; 1450Warnings: 1451Note 1051 Unknown table 'test.t1' 1452---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 1453# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=AUTOMATIC 1454SET GTID_NEXT = 'AUTOMATIC'; 1455BEGIN; INSERT INTO t0 VALUES (1);; 1456error ER_GTID_UNSAFE_CREATE_SELECT 1457CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1458ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1459include/assert.inc [One warning/error should be generated.] 1460include/assert.inc [It should be an Error, not a Warning.] 1461include/assert.inc [Text should be "violates GTID consistency"] 1462include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1463include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1464ROLLBACK; 1465SET GTID_NEXT = 'AUTOMATIC'; 1466include/assert.inc [Both counters should be 0] 1467DROP TABLE IF EXISTS t1; 1468Warnings: 1469Note 1051 Unknown table 'test.t1' 1470---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 1471# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=AUTOMATIC 1472SET GTID_NEXT = 'AUTOMATIC'; 1473BEGIN; INSERT INTO t0 VALUES (1);; 1474error ER_GTID_UNSAFE_CREATE_SELECT 1475CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1476ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1477include/assert.inc [One warning/error should be generated.] 1478include/assert.inc [It should be an Error, not a Warning.] 1479include/assert.inc [Text should be "violates GTID consistency"] 1480include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1481include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1482ROLLBACK; 1483SET GTID_NEXT = 'AUTOMATIC'; 1484include/assert.inc [Both counters should be 0] 1485DROP TABLE IF EXISTS t1; 1486Warnings: 1487Note 1051 Unknown table 'test.t1' 1488---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 1489# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=AUTOMATIC 1490SET GTID_NEXT = 'AUTOMATIC'; 1491BEGIN; INSERT INTO t0 VALUES (1);; 1492error ER_GTID_UNSAFE_CREATE_SELECT 1493CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1494ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1495include/assert.inc [One warning/error should be generated.] 1496include/assert.inc [It should be an Error, not a Warning.] 1497include/assert.inc [Text should be "violates GTID consistency"] 1498include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1499include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1500ROLLBACK; 1501SET GTID_NEXT = 'AUTOMATIC'; 1502include/assert.inc [Both counters should be 0] 1503DROP TABLE IF EXISTS t1; 1504Warnings: 1505Note 1051 Unknown table 'test.t1' 1506---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 1507# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=AUTOMATIC 1508SET GTID_NEXT = 'AUTOMATIC'; 1509BEGIN; INSERT INTO t0 VALUES (1);; 1510error ER_GTID_UNSAFE_CREATE_SELECT 1511CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1512ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1513include/assert.inc [One warning/error should be generated.] 1514include/assert.inc [It should be an Error, not a Warning.] 1515include/assert.inc [Text should be "violates GTID consistency"] 1516include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1517include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1518ROLLBACK; 1519SET GTID_NEXT = 'AUTOMATIC'; 1520include/assert.inc [Both counters should be 0] 1521DROP TABLE IF EXISTS t1; 1522Warnings: 1523Note 1051 Unknown table 'test.t1' 1524DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 1525######## ENFORCE_GTID_CONSISTENCY=ERROR GTID_MODE=ON GTID_NEXT=GTID ######## 1526CREATE TABLE t0 (a INT) ENGINE = InnoDB; 1527CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 1528CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 1529CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 1530CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 1531INSERT INTO nonempty_innodb VALUES (1); 1532INSERT INTO nonempty_myisam VALUES (1); 1533---- CREATE ... SELECT (value, 1 row) ---- 1534# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=GTID 1535SET GTID_NEXT = 'GTID'; 1536error ER_GTID_UNSAFE_CREATE_SELECT 1537CREATE TABLE t1 (a INT) SELECT 1; 1538ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1539include/assert.inc [One warning/error should be generated.] 1540include/assert.inc [It should be an Error, not a Warning.] 1541include/assert.inc [Text should be "violates GTID consistency"] 1542include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1543include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1544ROLLBACK; 1545SET GTID_NEXT = 'AUTOMATIC'; 1546include/assert.inc [Both counters should be 0] 1547DROP TABLE IF EXISTS t1; 1548Warnings: 1549Note 1051 Unknown table 'test.t1' 1550---- CREATE ... SELECT (InnoDB, 1 row) ---- 1551# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=GTID 1552SET GTID_NEXT = 'GTID'; 1553error ER_GTID_UNSAFE_CREATE_SELECT 1554CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1555ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1556include/assert.inc [One warning/error should be generated.] 1557include/assert.inc [It should be an Error, not a Warning.] 1558include/assert.inc [Text should be "violates GTID consistency"] 1559include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1560include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1561ROLLBACK; 1562SET GTID_NEXT = 'AUTOMATIC'; 1563include/assert.inc [Both counters should be 0] 1564DROP TABLE IF EXISTS t1; 1565Warnings: 1566Note 1051 Unknown table 'test.t1' 1567---- CREATE ... SELECT (MyISAM, 1 row) ---- 1568# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=GTID 1569SET GTID_NEXT = 'GTID'; 1570error ER_GTID_UNSAFE_CREATE_SELECT 1571CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1572ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1573include/assert.inc [One warning/error should be generated.] 1574include/assert.inc [It should be an Error, not a Warning.] 1575include/assert.inc [Text should be "violates GTID consistency"] 1576include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1577include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1578ROLLBACK; 1579SET GTID_NEXT = 'AUTOMATIC'; 1580include/assert.inc [Both counters should be 0] 1581DROP TABLE IF EXISTS t1; 1582Warnings: 1583Note 1051 Unknown table 'test.t1' 1584---- CREATE ... SELECT (InnoDB, 0 row) ---- 1585# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=GTID 1586SET GTID_NEXT = 'GTID'; 1587error ER_GTID_UNSAFE_CREATE_SELECT 1588CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1589ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1590include/assert.inc [One warning/error should be generated.] 1591include/assert.inc [It should be an Error, not a Warning.] 1592include/assert.inc [Text should be "violates GTID consistency"] 1593include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1594include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1595ROLLBACK; 1596SET GTID_NEXT = 'AUTOMATIC'; 1597include/assert.inc [Both counters should be 0] 1598DROP TABLE IF EXISTS t1; 1599Warnings: 1600Note 1051 Unknown table 'test.t1' 1601---- CREATE ... SELECT (MyISAM, 0 row) ---- 1602# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=GTID 1603SET GTID_NEXT = 'GTID'; 1604error ER_GTID_UNSAFE_CREATE_SELECT 1605CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1606ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1607include/assert.inc [One warning/error should be generated.] 1608include/assert.inc [It should be an Error, not a Warning.] 1609include/assert.inc [Text should be "violates GTID consistency"] 1610include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1611include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1612ROLLBACK; 1613SET GTID_NEXT = 'AUTOMATIC'; 1614include/assert.inc [Both counters should be 0] 1615DROP TABLE IF EXISTS t1; 1616Warnings: 1617Note 1051 Unknown table 'test.t1' 1618---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 1619# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=GTID 1620SET GTID_NEXT = 'GTID'; 1621BEGIN; INSERT INTO t0 VALUES (1);; 1622error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 1623CREATE TABLE t1 (a INT) SELECT 1; 1624ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 1625include/assert.inc [One warning/error should be generated.] 1626include/assert.inc [It should be an Error, not a Warning.] 1627include/assert.inc [Text should be "violates GTID consistency"] 1628include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1629include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1630ROLLBACK; 1631SET GTID_NEXT = 'AUTOMATIC'; 1632include/assert.inc [Both counters should be 0] 1633DROP TABLE IF EXISTS t1; 1634Warnings: 1635Note 1051 Unknown table 'test.t1' 1636---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 1637# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=GTID 1638SET GTID_NEXT = 'GTID'; 1639BEGIN; INSERT INTO t0 VALUES (1);; 1640error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 1641CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1642ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 1643include/assert.inc [One warning/error should be generated.] 1644include/assert.inc [It should be an Error, not a Warning.] 1645include/assert.inc [Text should be "violates GTID consistency"] 1646include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1647include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1648ROLLBACK; 1649SET GTID_NEXT = 'AUTOMATIC'; 1650include/assert.inc [Both counters should be 0] 1651DROP TABLE IF EXISTS t1; 1652Warnings: 1653Note 1051 Unknown table 'test.t1' 1654---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 1655# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=GTID 1656SET GTID_NEXT = 'GTID'; 1657BEGIN; INSERT INTO t0 VALUES (1);; 1658error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 1659CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1660ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 1661include/assert.inc [One warning/error should be generated.] 1662include/assert.inc [It should be an Error, not a Warning.] 1663include/assert.inc [Text should be "violates GTID consistency"] 1664include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1665include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1666ROLLBACK; 1667SET GTID_NEXT = 'AUTOMATIC'; 1668include/assert.inc [Both counters should be 0] 1669DROP TABLE IF EXISTS t1; 1670Warnings: 1671Note 1051 Unknown table 'test.t1' 1672---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 1673# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=GTID 1674SET GTID_NEXT = 'GTID'; 1675BEGIN; INSERT INTO t0 VALUES (1);; 1676error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 1677CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1678ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 1679include/assert.inc [One warning/error should be generated.] 1680include/assert.inc [It should be an Error, not a Warning.] 1681include/assert.inc [Text should be "violates GTID consistency"] 1682include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1683include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1684ROLLBACK; 1685SET GTID_NEXT = 'AUTOMATIC'; 1686include/assert.inc [Both counters should be 0] 1687DROP TABLE IF EXISTS t1; 1688Warnings: 1689Note 1051 Unknown table 'test.t1' 1690---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 1691# enforce_gtid_consistency=1 gtid_mode=3 gtid_next=GTID 1692SET GTID_NEXT = 'GTID'; 1693BEGIN; INSERT INTO t0 VALUES (1);; 1694error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 1695CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1696ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 1697include/assert.inc [One warning/error should be generated.] 1698include/assert.inc [It should be an Error, not a Warning.] 1699include/assert.inc [Text should be "violates GTID consistency"] 1700include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1701include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1702ROLLBACK; 1703SET GTID_NEXT = 'AUTOMATIC'; 1704include/assert.inc [Both counters should be 0] 1705DROP TABLE IF EXISTS t1; 1706Warnings: 1707Note 1051 Unknown table 'test.t1' 1708DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 1709SET GLOBAL GTID_MODE = 2; 1710######## ENFORCE_GTID_CONSISTENCY=ERROR GTID_MODE=ON_PERMISSIVE GTID_NEXT=AUTOMATIC ######## 1711CREATE TABLE t0 (a INT) ENGINE = InnoDB; 1712CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 1713CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 1714CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 1715CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 1716INSERT INTO nonempty_innodb VALUES (1); 1717INSERT INTO nonempty_myisam VALUES (1); 1718---- CREATE ... SELECT (value, 1 row) ---- 1719# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=AUTOMATIC 1720SET GTID_NEXT = 'AUTOMATIC'; 1721error ER_GTID_UNSAFE_CREATE_SELECT 1722CREATE TABLE t1 (a INT) SELECT 1; 1723ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1724include/assert.inc [One warning/error should be generated.] 1725include/assert.inc [It should be an Error, not a Warning.] 1726include/assert.inc [Text should be "violates GTID consistency"] 1727include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1728include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1729ROLLBACK; 1730SET GTID_NEXT = 'AUTOMATIC'; 1731include/assert.inc [Both counters should be 0] 1732DROP TABLE IF EXISTS t1; 1733Warnings: 1734Note 1051 Unknown table 'test.t1' 1735---- CREATE ... SELECT (InnoDB, 1 row) ---- 1736# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=AUTOMATIC 1737SET GTID_NEXT = 'AUTOMATIC'; 1738error ER_GTID_UNSAFE_CREATE_SELECT 1739CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1740ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1741include/assert.inc [One warning/error should be generated.] 1742include/assert.inc [It should be an Error, not a Warning.] 1743include/assert.inc [Text should be "violates GTID consistency"] 1744include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1745include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1746ROLLBACK; 1747SET GTID_NEXT = 'AUTOMATIC'; 1748include/assert.inc [Both counters should be 0] 1749DROP TABLE IF EXISTS t1; 1750Warnings: 1751Note 1051 Unknown table 'test.t1' 1752---- CREATE ... SELECT (MyISAM, 1 row) ---- 1753# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=AUTOMATIC 1754SET GTID_NEXT = 'AUTOMATIC'; 1755error ER_GTID_UNSAFE_CREATE_SELECT 1756CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1757ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1758include/assert.inc [One warning/error should be generated.] 1759include/assert.inc [It should be an Error, not a Warning.] 1760include/assert.inc [Text should be "violates GTID consistency"] 1761include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1762include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1763ROLLBACK; 1764SET GTID_NEXT = 'AUTOMATIC'; 1765include/assert.inc [Both counters should be 0] 1766DROP TABLE IF EXISTS t1; 1767Warnings: 1768Note 1051 Unknown table 'test.t1' 1769---- CREATE ... SELECT (InnoDB, 0 row) ---- 1770# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=AUTOMATIC 1771SET GTID_NEXT = 'AUTOMATIC'; 1772error ER_GTID_UNSAFE_CREATE_SELECT 1773CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1774ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1775include/assert.inc [One warning/error should be generated.] 1776include/assert.inc [It should be an Error, not a Warning.] 1777include/assert.inc [Text should be "violates GTID consistency"] 1778include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1779include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1780ROLLBACK; 1781SET GTID_NEXT = 'AUTOMATIC'; 1782include/assert.inc [Both counters should be 0] 1783DROP TABLE IF EXISTS t1; 1784Warnings: 1785Note 1051 Unknown table 'test.t1' 1786---- CREATE ... SELECT (MyISAM, 0 row) ---- 1787# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=AUTOMATIC 1788SET GTID_NEXT = 'AUTOMATIC'; 1789error ER_GTID_UNSAFE_CREATE_SELECT 1790CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1791ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1792include/assert.inc [One warning/error should be generated.] 1793include/assert.inc [It should be an Error, not a Warning.] 1794include/assert.inc [Text should be "violates GTID consistency"] 1795include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1796include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1797ROLLBACK; 1798SET GTID_NEXT = 'AUTOMATIC'; 1799include/assert.inc [Both counters should be 0] 1800DROP TABLE IF EXISTS t1; 1801Warnings: 1802Note 1051 Unknown table 'test.t1' 1803---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 1804# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=AUTOMATIC 1805SET GTID_NEXT = 'AUTOMATIC'; 1806BEGIN; INSERT INTO t0 VALUES (1);; 1807error ER_GTID_UNSAFE_CREATE_SELECT 1808CREATE TABLE t1 (a INT) SELECT 1; 1809ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1810include/assert.inc [One warning/error should be generated.] 1811include/assert.inc [It should be an Error, not a Warning.] 1812include/assert.inc [Text should be "violates GTID consistency"] 1813include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1814include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1815ROLLBACK; 1816SET GTID_NEXT = 'AUTOMATIC'; 1817include/assert.inc [Both counters should be 0] 1818DROP TABLE IF EXISTS t1; 1819Warnings: 1820Note 1051 Unknown table 'test.t1' 1821---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 1822# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=AUTOMATIC 1823SET GTID_NEXT = 'AUTOMATIC'; 1824BEGIN; INSERT INTO t0 VALUES (1);; 1825error ER_GTID_UNSAFE_CREATE_SELECT 1826CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1827ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1828include/assert.inc [One warning/error should be generated.] 1829include/assert.inc [It should be an Error, not a Warning.] 1830include/assert.inc [Text should be "violates GTID consistency"] 1831include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1832include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1833ROLLBACK; 1834SET GTID_NEXT = 'AUTOMATIC'; 1835include/assert.inc [Both counters should be 0] 1836DROP TABLE IF EXISTS t1; 1837Warnings: 1838Note 1051 Unknown table 'test.t1' 1839---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 1840# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=AUTOMATIC 1841SET GTID_NEXT = 'AUTOMATIC'; 1842BEGIN; INSERT INTO t0 VALUES (1);; 1843error ER_GTID_UNSAFE_CREATE_SELECT 1844CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1845ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1846include/assert.inc [One warning/error should be generated.] 1847include/assert.inc [It should be an Error, not a Warning.] 1848include/assert.inc [Text should be "violates GTID consistency"] 1849include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1850include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1851ROLLBACK; 1852SET GTID_NEXT = 'AUTOMATIC'; 1853include/assert.inc [Both counters should be 0] 1854DROP TABLE IF EXISTS t1; 1855Warnings: 1856Note 1051 Unknown table 'test.t1' 1857---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 1858# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=AUTOMATIC 1859SET GTID_NEXT = 'AUTOMATIC'; 1860BEGIN; INSERT INTO t0 VALUES (1);; 1861error ER_GTID_UNSAFE_CREATE_SELECT 1862CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1863ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1864include/assert.inc [One warning/error should be generated.] 1865include/assert.inc [It should be an Error, not a Warning.] 1866include/assert.inc [Text should be "violates GTID consistency"] 1867include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1868include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1869ROLLBACK; 1870SET GTID_NEXT = 'AUTOMATIC'; 1871include/assert.inc [Both counters should be 0] 1872DROP TABLE IF EXISTS t1; 1873Warnings: 1874Note 1051 Unknown table 'test.t1' 1875---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 1876# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=AUTOMATIC 1877SET GTID_NEXT = 'AUTOMATIC'; 1878BEGIN; INSERT INTO t0 VALUES (1);; 1879error ER_GTID_UNSAFE_CREATE_SELECT 1880CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1881ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1882include/assert.inc [One warning/error should be generated.] 1883include/assert.inc [It should be an Error, not a Warning.] 1884include/assert.inc [Text should be "violates GTID consistency"] 1885include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1886include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1887ROLLBACK; 1888SET GTID_NEXT = 'AUTOMATIC'; 1889include/assert.inc [Both counters should be 0] 1890DROP TABLE IF EXISTS t1; 1891Warnings: 1892Note 1051 Unknown table 'test.t1' 1893DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 1894######## ENFORCE_GTID_CONSISTENCY=ERROR GTID_MODE=ON_PERMISSIVE GTID_NEXT=ANONYMOUS ######## 1895CREATE TABLE t0 (a INT) ENGINE = InnoDB; 1896CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 1897CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 1898CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 1899CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 1900INSERT INTO nonempty_innodb VALUES (1); 1901INSERT INTO nonempty_myisam VALUES (1); 1902---- CREATE ... SELECT (value, 1 row) ---- 1903# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=ANONYMOUS 1904SET GTID_NEXT = 'ANONYMOUS'; 1905error ER_GTID_UNSAFE_CREATE_SELECT 1906CREATE TABLE t1 (a INT) SELECT 1; 1907ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1908include/assert.inc [One warning/error should be generated.] 1909include/assert.inc [It should be an Error, not a Warning.] 1910include/assert.inc [Text should be "violates GTID consistency"] 1911include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1912include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1913ROLLBACK; 1914SET GTID_NEXT = 'AUTOMATIC'; 1915include/assert.inc [Both counters should be 0] 1916DROP TABLE IF EXISTS t1; 1917Warnings: 1918Note 1051 Unknown table 'test.t1' 1919---- CREATE ... SELECT (InnoDB, 1 row) ---- 1920# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=ANONYMOUS 1921SET GTID_NEXT = 'ANONYMOUS'; 1922error ER_GTID_UNSAFE_CREATE_SELECT 1923CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 1924ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1925include/assert.inc [One warning/error should be generated.] 1926include/assert.inc [It should be an Error, not a Warning.] 1927include/assert.inc [Text should be "violates GTID consistency"] 1928include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1929include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1930ROLLBACK; 1931SET GTID_NEXT = 'AUTOMATIC'; 1932include/assert.inc [Both counters should be 0] 1933DROP TABLE IF EXISTS t1; 1934Warnings: 1935Note 1051 Unknown table 'test.t1' 1936---- CREATE ... SELECT (MyISAM, 1 row) ---- 1937# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=ANONYMOUS 1938SET GTID_NEXT = 'ANONYMOUS'; 1939error ER_GTID_UNSAFE_CREATE_SELECT 1940CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 1941ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1942include/assert.inc [One warning/error should be generated.] 1943include/assert.inc [It should be an Error, not a Warning.] 1944include/assert.inc [Text should be "violates GTID consistency"] 1945include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1946include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1947ROLLBACK; 1948SET GTID_NEXT = 'AUTOMATIC'; 1949include/assert.inc [Both counters should be 0] 1950DROP TABLE IF EXISTS t1; 1951Warnings: 1952Note 1051 Unknown table 'test.t1' 1953---- CREATE ... SELECT (InnoDB, 0 row) ---- 1954# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=ANONYMOUS 1955SET GTID_NEXT = 'ANONYMOUS'; 1956error ER_GTID_UNSAFE_CREATE_SELECT 1957CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 1958ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1959include/assert.inc [One warning/error should be generated.] 1960include/assert.inc [It should be an Error, not a Warning.] 1961include/assert.inc [Text should be "violates GTID consistency"] 1962include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1963include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1964ROLLBACK; 1965SET GTID_NEXT = 'AUTOMATIC'; 1966include/assert.inc [Both counters should be 0] 1967DROP TABLE IF EXISTS t1; 1968Warnings: 1969Note 1051 Unknown table 'test.t1' 1970---- CREATE ... SELECT (MyISAM, 0 row) ---- 1971# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=ANONYMOUS 1972SET GTID_NEXT = 'ANONYMOUS'; 1973error ER_GTID_UNSAFE_CREATE_SELECT 1974CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 1975ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1976include/assert.inc [One warning/error should be generated.] 1977include/assert.inc [It should be an Error, not a Warning.] 1978include/assert.inc [Text should be "violates GTID consistency"] 1979include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1980include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1981ROLLBACK; 1982SET GTID_NEXT = 'AUTOMATIC'; 1983include/assert.inc [Both counters should be 0] 1984DROP TABLE IF EXISTS t1; 1985Warnings: 1986Note 1051 Unknown table 'test.t1' 1987---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 1988# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=ANONYMOUS 1989SET GTID_NEXT = 'ANONYMOUS'; 1990BEGIN; INSERT INTO t0 VALUES (1);; 1991error ER_GTID_UNSAFE_CREATE_SELECT 1992CREATE TABLE t1 (a INT) SELECT 1; 1993ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 1994include/assert.inc [One warning/error should be generated.] 1995include/assert.inc [It should be an Error, not a Warning.] 1996include/assert.inc [Text should be "violates GTID consistency"] 1997include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1998include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 1999ROLLBACK; 2000SET GTID_NEXT = 'AUTOMATIC'; 2001include/assert.inc [Both counters should be 0] 2002DROP TABLE IF EXISTS t1; 2003Warnings: 2004Note 1051 Unknown table 'test.t1' 2005---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 2006# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=ANONYMOUS 2007SET GTID_NEXT = 'ANONYMOUS'; 2008BEGIN; INSERT INTO t0 VALUES (1);; 2009error ER_GTID_UNSAFE_CREATE_SELECT 2010CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 2011ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2012include/assert.inc [One warning/error should be generated.] 2013include/assert.inc [It should be an Error, not a Warning.] 2014include/assert.inc [Text should be "violates GTID consistency"] 2015include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2016include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2017ROLLBACK; 2018SET GTID_NEXT = 'AUTOMATIC'; 2019include/assert.inc [Both counters should be 0] 2020DROP TABLE IF EXISTS t1; 2021Warnings: 2022Note 1051 Unknown table 'test.t1' 2023---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 2024# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=ANONYMOUS 2025SET GTID_NEXT = 'ANONYMOUS'; 2026BEGIN; INSERT INTO t0 VALUES (1);; 2027error ER_GTID_UNSAFE_CREATE_SELECT 2028CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 2029ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2030include/assert.inc [One warning/error should be generated.] 2031include/assert.inc [It should be an Error, not a Warning.] 2032include/assert.inc [Text should be "violates GTID consistency"] 2033include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2034include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2035ROLLBACK; 2036SET GTID_NEXT = 'AUTOMATIC'; 2037include/assert.inc [Both counters should be 0] 2038DROP TABLE IF EXISTS t1; 2039Warnings: 2040Note 1051 Unknown table 'test.t1' 2041---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 2042# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=ANONYMOUS 2043SET GTID_NEXT = 'ANONYMOUS'; 2044BEGIN; INSERT INTO t0 VALUES (1);; 2045error ER_GTID_UNSAFE_CREATE_SELECT 2046CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 2047ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2048include/assert.inc [One warning/error should be generated.] 2049include/assert.inc [It should be an Error, not a Warning.] 2050include/assert.inc [Text should be "violates GTID consistency"] 2051include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2052include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2053ROLLBACK; 2054SET GTID_NEXT = 'AUTOMATIC'; 2055include/assert.inc [Both counters should be 0] 2056DROP TABLE IF EXISTS t1; 2057Warnings: 2058Note 1051 Unknown table 'test.t1' 2059---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 2060# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=ANONYMOUS 2061SET GTID_NEXT = 'ANONYMOUS'; 2062BEGIN; INSERT INTO t0 VALUES (1);; 2063error ER_GTID_UNSAFE_CREATE_SELECT 2064CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 2065ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2066include/assert.inc [One warning/error should be generated.] 2067include/assert.inc [It should be an Error, not a Warning.] 2068include/assert.inc [Text should be "violates GTID consistency"] 2069include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2070include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2071ROLLBACK; 2072SET GTID_NEXT = 'AUTOMATIC'; 2073include/assert.inc [Both counters should be 0] 2074DROP TABLE IF EXISTS t1; 2075Warnings: 2076Note 1051 Unknown table 'test.t1' 2077DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 2078######## ENFORCE_GTID_CONSISTENCY=ERROR GTID_MODE=ON_PERMISSIVE GTID_NEXT=GTID ######## 2079CREATE TABLE t0 (a INT) ENGINE = InnoDB; 2080CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 2081CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 2082CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 2083CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 2084INSERT INTO nonempty_innodb VALUES (1); 2085INSERT INTO nonempty_myisam VALUES (1); 2086---- CREATE ... SELECT (value, 1 row) ---- 2087# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=GTID 2088SET GTID_NEXT = 'GTID'; 2089error ER_GTID_UNSAFE_CREATE_SELECT 2090CREATE TABLE t1 (a INT) SELECT 1; 2091ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2092include/assert.inc [One warning/error should be generated.] 2093include/assert.inc [It should be an Error, not a Warning.] 2094include/assert.inc [Text should be "violates GTID consistency"] 2095include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2096include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2097ROLLBACK; 2098SET GTID_NEXT = 'AUTOMATIC'; 2099include/assert.inc [Both counters should be 0] 2100DROP TABLE IF EXISTS t1; 2101Warnings: 2102Note 1051 Unknown table 'test.t1' 2103---- CREATE ... SELECT (InnoDB, 1 row) ---- 2104# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=GTID 2105SET GTID_NEXT = 'GTID'; 2106error ER_GTID_UNSAFE_CREATE_SELECT 2107CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 2108ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2109include/assert.inc [One warning/error should be generated.] 2110include/assert.inc [It should be an Error, not a Warning.] 2111include/assert.inc [Text should be "violates GTID consistency"] 2112include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2113include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2114ROLLBACK; 2115SET GTID_NEXT = 'AUTOMATIC'; 2116include/assert.inc [Both counters should be 0] 2117DROP TABLE IF EXISTS t1; 2118Warnings: 2119Note 1051 Unknown table 'test.t1' 2120---- CREATE ... SELECT (MyISAM, 1 row) ---- 2121# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=GTID 2122SET GTID_NEXT = 'GTID'; 2123error ER_GTID_UNSAFE_CREATE_SELECT 2124CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 2125ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2126include/assert.inc [One warning/error should be generated.] 2127include/assert.inc [It should be an Error, not a Warning.] 2128include/assert.inc [Text should be "violates GTID consistency"] 2129include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2130include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2131ROLLBACK; 2132SET GTID_NEXT = 'AUTOMATIC'; 2133include/assert.inc [Both counters should be 0] 2134DROP TABLE IF EXISTS t1; 2135Warnings: 2136Note 1051 Unknown table 'test.t1' 2137---- CREATE ... SELECT (InnoDB, 0 row) ---- 2138# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=GTID 2139SET GTID_NEXT = 'GTID'; 2140error ER_GTID_UNSAFE_CREATE_SELECT 2141CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 2142ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2143include/assert.inc [One warning/error should be generated.] 2144include/assert.inc [It should be an Error, not a Warning.] 2145include/assert.inc [Text should be "violates GTID consistency"] 2146include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2147include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2148ROLLBACK; 2149SET GTID_NEXT = 'AUTOMATIC'; 2150include/assert.inc [Both counters should be 0] 2151DROP TABLE IF EXISTS t1; 2152Warnings: 2153Note 1051 Unknown table 'test.t1' 2154---- CREATE ... SELECT (MyISAM, 0 row) ---- 2155# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=GTID 2156SET GTID_NEXT = 'GTID'; 2157error ER_GTID_UNSAFE_CREATE_SELECT 2158CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 2159ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2160include/assert.inc [One warning/error should be generated.] 2161include/assert.inc [It should be an Error, not a Warning.] 2162include/assert.inc [Text should be "violates GTID consistency"] 2163include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2164include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2165ROLLBACK; 2166SET GTID_NEXT = 'AUTOMATIC'; 2167include/assert.inc [Both counters should be 0] 2168DROP TABLE IF EXISTS t1; 2169Warnings: 2170Note 1051 Unknown table 'test.t1' 2171---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 2172# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=GTID 2173SET GTID_NEXT = 'GTID'; 2174BEGIN; INSERT INTO t0 VALUES (1);; 2175error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 2176CREATE TABLE t1 (a INT) SELECT 1; 2177ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 2178include/assert.inc [One warning/error should be generated.] 2179include/assert.inc [It should be an Error, not a Warning.] 2180include/assert.inc [Text should be "violates GTID consistency"] 2181include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2182include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2183ROLLBACK; 2184SET GTID_NEXT = 'AUTOMATIC'; 2185include/assert.inc [Both counters should be 0] 2186DROP TABLE IF EXISTS t1; 2187Warnings: 2188Note 1051 Unknown table 'test.t1' 2189---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 2190# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=GTID 2191SET GTID_NEXT = 'GTID'; 2192BEGIN; INSERT INTO t0 VALUES (1);; 2193error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 2194CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 2195ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 2196include/assert.inc [One warning/error should be generated.] 2197include/assert.inc [It should be an Error, not a Warning.] 2198include/assert.inc [Text should be "violates GTID consistency"] 2199include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2200include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2201ROLLBACK; 2202SET GTID_NEXT = 'AUTOMATIC'; 2203include/assert.inc [Both counters should be 0] 2204DROP TABLE IF EXISTS t1; 2205Warnings: 2206Note 1051 Unknown table 'test.t1' 2207---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 2208# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=GTID 2209SET GTID_NEXT = 'GTID'; 2210BEGIN; INSERT INTO t0 VALUES (1);; 2211error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 2212CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 2213ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 2214include/assert.inc [One warning/error should be generated.] 2215include/assert.inc [It should be an Error, not a Warning.] 2216include/assert.inc [Text should be "violates GTID consistency"] 2217include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2218include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2219ROLLBACK; 2220SET GTID_NEXT = 'AUTOMATIC'; 2221include/assert.inc [Both counters should be 0] 2222DROP TABLE IF EXISTS t1; 2223Warnings: 2224Note 1051 Unknown table 'test.t1' 2225---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 2226# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=GTID 2227SET GTID_NEXT = 'GTID'; 2228BEGIN; INSERT INTO t0 VALUES (1);; 2229error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 2230CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 2231ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 2232include/assert.inc [One warning/error should be generated.] 2233include/assert.inc [It should be an Error, not a Warning.] 2234include/assert.inc [Text should be "violates GTID consistency"] 2235include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2236include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2237ROLLBACK; 2238SET GTID_NEXT = 'AUTOMATIC'; 2239include/assert.inc [Both counters should be 0] 2240DROP TABLE IF EXISTS t1; 2241Warnings: 2242Note 1051 Unknown table 'test.t1' 2243---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 2244# enforce_gtid_consistency=1 gtid_mode=2 gtid_next=GTID 2245SET GTID_NEXT = 'GTID'; 2246BEGIN; INSERT INTO t0 VALUES (1);; 2247error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 2248CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 2249ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 2250include/assert.inc [One warning/error should be generated.] 2251include/assert.inc [It should be an Error, not a Warning.] 2252include/assert.inc [Text should be "violates GTID consistency"] 2253include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2254include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2255ROLLBACK; 2256SET GTID_NEXT = 'AUTOMATIC'; 2257include/assert.inc [Both counters should be 0] 2258DROP TABLE IF EXISTS t1; 2259Warnings: 2260Note 1051 Unknown table 'test.t1' 2261DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 2262SET GLOBAL GTID_MODE = 1; 2263######## ENFORCE_GTID_CONSISTENCY=ERROR GTID_MODE=OFF_PERMISSIVE GTID_NEXT=AUTOMATIC ######## 2264CREATE TABLE t0 (a INT) ENGINE = InnoDB; 2265CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 2266CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 2267CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 2268CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 2269INSERT INTO nonempty_innodb VALUES (1); 2270INSERT INTO nonempty_myisam VALUES (1); 2271---- CREATE ... SELECT (value, 1 row) ---- 2272# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=AUTOMATIC 2273SET GTID_NEXT = 'AUTOMATIC'; 2274error ER_GTID_UNSAFE_CREATE_SELECT 2275CREATE TABLE t1 (a INT) SELECT 1; 2276ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2277include/assert.inc [One warning/error should be generated.] 2278include/assert.inc [It should be an Error, not a Warning.] 2279include/assert.inc [Text should be "violates GTID consistency"] 2280include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2281include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2282ROLLBACK; 2283SET GTID_NEXT = 'AUTOMATIC'; 2284include/assert.inc [Both counters should be 0] 2285DROP TABLE IF EXISTS t1; 2286Warnings: 2287Note 1051 Unknown table 'test.t1' 2288---- CREATE ... SELECT (InnoDB, 1 row) ---- 2289# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=AUTOMATIC 2290SET GTID_NEXT = 'AUTOMATIC'; 2291error ER_GTID_UNSAFE_CREATE_SELECT 2292CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 2293ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2294include/assert.inc [One warning/error should be generated.] 2295include/assert.inc [It should be an Error, not a Warning.] 2296include/assert.inc [Text should be "violates GTID consistency"] 2297include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2298include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2299ROLLBACK; 2300SET GTID_NEXT = 'AUTOMATIC'; 2301include/assert.inc [Both counters should be 0] 2302DROP TABLE IF EXISTS t1; 2303Warnings: 2304Note 1051 Unknown table 'test.t1' 2305---- CREATE ... SELECT (MyISAM, 1 row) ---- 2306# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=AUTOMATIC 2307SET GTID_NEXT = 'AUTOMATIC'; 2308error ER_GTID_UNSAFE_CREATE_SELECT 2309CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 2310ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2311include/assert.inc [One warning/error should be generated.] 2312include/assert.inc [It should be an Error, not a Warning.] 2313include/assert.inc [Text should be "violates GTID consistency"] 2314include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2315include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2316ROLLBACK; 2317SET GTID_NEXT = 'AUTOMATIC'; 2318include/assert.inc [Both counters should be 0] 2319DROP TABLE IF EXISTS t1; 2320Warnings: 2321Note 1051 Unknown table 'test.t1' 2322---- CREATE ... SELECT (InnoDB, 0 row) ---- 2323# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=AUTOMATIC 2324SET GTID_NEXT = 'AUTOMATIC'; 2325error ER_GTID_UNSAFE_CREATE_SELECT 2326CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 2327ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2328include/assert.inc [One warning/error should be generated.] 2329include/assert.inc [It should be an Error, not a Warning.] 2330include/assert.inc [Text should be "violates GTID consistency"] 2331include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2332include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2333ROLLBACK; 2334SET GTID_NEXT = 'AUTOMATIC'; 2335include/assert.inc [Both counters should be 0] 2336DROP TABLE IF EXISTS t1; 2337Warnings: 2338Note 1051 Unknown table 'test.t1' 2339---- CREATE ... SELECT (MyISAM, 0 row) ---- 2340# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=AUTOMATIC 2341SET GTID_NEXT = 'AUTOMATIC'; 2342error ER_GTID_UNSAFE_CREATE_SELECT 2343CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 2344ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2345include/assert.inc [One warning/error should be generated.] 2346include/assert.inc [It should be an Error, not a Warning.] 2347include/assert.inc [Text should be "violates GTID consistency"] 2348include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2349include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2350ROLLBACK; 2351SET GTID_NEXT = 'AUTOMATIC'; 2352include/assert.inc [Both counters should be 0] 2353DROP TABLE IF EXISTS t1; 2354Warnings: 2355Note 1051 Unknown table 'test.t1' 2356---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 2357# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=AUTOMATIC 2358SET GTID_NEXT = 'AUTOMATIC'; 2359BEGIN; INSERT INTO t0 VALUES (1);; 2360error ER_GTID_UNSAFE_CREATE_SELECT 2361CREATE TABLE t1 (a INT) SELECT 1; 2362ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2363include/assert.inc [One warning/error should be generated.] 2364include/assert.inc [It should be an Error, not a Warning.] 2365include/assert.inc [Text should be "violates GTID consistency"] 2366include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2367include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2368ROLLBACK; 2369SET GTID_NEXT = 'AUTOMATIC'; 2370include/assert.inc [Both counters should be 0] 2371DROP TABLE IF EXISTS t1; 2372Warnings: 2373Note 1051 Unknown table 'test.t1' 2374---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 2375# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=AUTOMATIC 2376SET GTID_NEXT = 'AUTOMATIC'; 2377BEGIN; INSERT INTO t0 VALUES (1);; 2378error ER_GTID_UNSAFE_CREATE_SELECT 2379CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 2380ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2381include/assert.inc [One warning/error should be generated.] 2382include/assert.inc [It should be an Error, not a Warning.] 2383include/assert.inc [Text should be "violates GTID consistency"] 2384include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2385include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2386ROLLBACK; 2387SET GTID_NEXT = 'AUTOMATIC'; 2388include/assert.inc [Both counters should be 0] 2389DROP TABLE IF EXISTS t1; 2390Warnings: 2391Note 1051 Unknown table 'test.t1' 2392---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 2393# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=AUTOMATIC 2394SET GTID_NEXT = 'AUTOMATIC'; 2395BEGIN; INSERT INTO t0 VALUES (1);; 2396error ER_GTID_UNSAFE_CREATE_SELECT 2397CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 2398ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2399include/assert.inc [One warning/error should be generated.] 2400include/assert.inc [It should be an Error, not a Warning.] 2401include/assert.inc [Text should be "violates GTID consistency"] 2402include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2403include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2404ROLLBACK; 2405SET GTID_NEXT = 'AUTOMATIC'; 2406include/assert.inc [Both counters should be 0] 2407DROP TABLE IF EXISTS t1; 2408Warnings: 2409Note 1051 Unknown table 'test.t1' 2410---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 2411# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=AUTOMATIC 2412SET GTID_NEXT = 'AUTOMATIC'; 2413BEGIN; INSERT INTO t0 VALUES (1);; 2414error ER_GTID_UNSAFE_CREATE_SELECT 2415CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 2416ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2417include/assert.inc [One warning/error should be generated.] 2418include/assert.inc [It should be an Error, not a Warning.] 2419include/assert.inc [Text should be "violates GTID consistency"] 2420include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2421include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2422ROLLBACK; 2423SET GTID_NEXT = 'AUTOMATIC'; 2424include/assert.inc [Both counters should be 0] 2425DROP TABLE IF EXISTS t1; 2426Warnings: 2427Note 1051 Unknown table 'test.t1' 2428---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 2429# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=AUTOMATIC 2430SET GTID_NEXT = 'AUTOMATIC'; 2431BEGIN; INSERT INTO t0 VALUES (1);; 2432error ER_GTID_UNSAFE_CREATE_SELECT 2433CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 2434ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2435include/assert.inc [One warning/error should be generated.] 2436include/assert.inc [It should be an Error, not a Warning.] 2437include/assert.inc [Text should be "violates GTID consistency"] 2438include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2439include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2440ROLLBACK; 2441SET GTID_NEXT = 'AUTOMATIC'; 2442include/assert.inc [Both counters should be 0] 2443DROP TABLE IF EXISTS t1; 2444Warnings: 2445Note 1051 Unknown table 'test.t1' 2446DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 2447######## ENFORCE_GTID_CONSISTENCY=ERROR GTID_MODE=OFF_PERMISSIVE GTID_NEXT=ANONYMOUS ######## 2448CREATE TABLE t0 (a INT) ENGINE = InnoDB; 2449CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 2450CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 2451CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 2452CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 2453INSERT INTO nonempty_innodb VALUES (1); 2454INSERT INTO nonempty_myisam VALUES (1); 2455---- CREATE ... SELECT (value, 1 row) ---- 2456# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=ANONYMOUS 2457SET GTID_NEXT = 'ANONYMOUS'; 2458error ER_GTID_UNSAFE_CREATE_SELECT 2459CREATE TABLE t1 (a INT) SELECT 1; 2460ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2461include/assert.inc [One warning/error should be generated.] 2462include/assert.inc [It should be an Error, not a Warning.] 2463include/assert.inc [Text should be "violates GTID consistency"] 2464include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2465include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2466ROLLBACK; 2467SET GTID_NEXT = 'AUTOMATIC'; 2468include/assert.inc [Both counters should be 0] 2469DROP TABLE IF EXISTS t1; 2470Warnings: 2471Note 1051 Unknown table 'test.t1' 2472---- CREATE ... SELECT (InnoDB, 1 row) ---- 2473# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=ANONYMOUS 2474SET GTID_NEXT = 'ANONYMOUS'; 2475error ER_GTID_UNSAFE_CREATE_SELECT 2476CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 2477ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2478include/assert.inc [One warning/error should be generated.] 2479include/assert.inc [It should be an Error, not a Warning.] 2480include/assert.inc [Text should be "violates GTID consistency"] 2481include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2482include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2483ROLLBACK; 2484SET GTID_NEXT = 'AUTOMATIC'; 2485include/assert.inc [Both counters should be 0] 2486DROP TABLE IF EXISTS t1; 2487Warnings: 2488Note 1051 Unknown table 'test.t1' 2489---- CREATE ... SELECT (MyISAM, 1 row) ---- 2490# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=ANONYMOUS 2491SET GTID_NEXT = 'ANONYMOUS'; 2492error ER_GTID_UNSAFE_CREATE_SELECT 2493CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 2494ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2495include/assert.inc [One warning/error should be generated.] 2496include/assert.inc [It should be an Error, not a Warning.] 2497include/assert.inc [Text should be "violates GTID consistency"] 2498include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2499include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2500ROLLBACK; 2501SET GTID_NEXT = 'AUTOMATIC'; 2502include/assert.inc [Both counters should be 0] 2503DROP TABLE IF EXISTS t1; 2504Warnings: 2505Note 1051 Unknown table 'test.t1' 2506---- CREATE ... SELECT (InnoDB, 0 row) ---- 2507# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=ANONYMOUS 2508SET GTID_NEXT = 'ANONYMOUS'; 2509error ER_GTID_UNSAFE_CREATE_SELECT 2510CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 2511ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2512include/assert.inc [One warning/error should be generated.] 2513include/assert.inc [It should be an Error, not a Warning.] 2514include/assert.inc [Text should be "violates GTID consistency"] 2515include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2516include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2517ROLLBACK; 2518SET GTID_NEXT = 'AUTOMATIC'; 2519include/assert.inc [Both counters should be 0] 2520DROP TABLE IF EXISTS t1; 2521Warnings: 2522Note 1051 Unknown table 'test.t1' 2523---- CREATE ... SELECT (MyISAM, 0 row) ---- 2524# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=ANONYMOUS 2525SET GTID_NEXT = 'ANONYMOUS'; 2526error ER_GTID_UNSAFE_CREATE_SELECT 2527CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 2528ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2529include/assert.inc [One warning/error should be generated.] 2530include/assert.inc [It should be an Error, not a Warning.] 2531include/assert.inc [Text should be "violates GTID consistency"] 2532include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2533include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2534ROLLBACK; 2535SET GTID_NEXT = 'AUTOMATIC'; 2536include/assert.inc [Both counters should be 0] 2537DROP TABLE IF EXISTS t1; 2538Warnings: 2539Note 1051 Unknown table 'test.t1' 2540---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 2541# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=ANONYMOUS 2542SET GTID_NEXT = 'ANONYMOUS'; 2543BEGIN; INSERT INTO t0 VALUES (1);; 2544error ER_GTID_UNSAFE_CREATE_SELECT 2545CREATE TABLE t1 (a INT) SELECT 1; 2546ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2547include/assert.inc [One warning/error should be generated.] 2548include/assert.inc [It should be an Error, not a Warning.] 2549include/assert.inc [Text should be "violates GTID consistency"] 2550include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2551include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2552ROLLBACK; 2553SET GTID_NEXT = 'AUTOMATIC'; 2554include/assert.inc [Both counters should be 0] 2555DROP TABLE IF EXISTS t1; 2556Warnings: 2557Note 1051 Unknown table 'test.t1' 2558---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 2559# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=ANONYMOUS 2560SET GTID_NEXT = 'ANONYMOUS'; 2561BEGIN; INSERT INTO t0 VALUES (1);; 2562error ER_GTID_UNSAFE_CREATE_SELECT 2563CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 2564ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2565include/assert.inc [One warning/error should be generated.] 2566include/assert.inc [It should be an Error, not a Warning.] 2567include/assert.inc [Text should be "violates GTID consistency"] 2568include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2569include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2570ROLLBACK; 2571SET GTID_NEXT = 'AUTOMATIC'; 2572include/assert.inc [Both counters should be 0] 2573DROP TABLE IF EXISTS t1; 2574Warnings: 2575Note 1051 Unknown table 'test.t1' 2576---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 2577# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=ANONYMOUS 2578SET GTID_NEXT = 'ANONYMOUS'; 2579BEGIN; INSERT INTO t0 VALUES (1);; 2580error ER_GTID_UNSAFE_CREATE_SELECT 2581CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 2582ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2583include/assert.inc [One warning/error should be generated.] 2584include/assert.inc [It should be an Error, not a Warning.] 2585include/assert.inc [Text should be "violates GTID consistency"] 2586include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2587include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2588ROLLBACK; 2589SET GTID_NEXT = 'AUTOMATIC'; 2590include/assert.inc [Both counters should be 0] 2591DROP TABLE IF EXISTS t1; 2592Warnings: 2593Note 1051 Unknown table 'test.t1' 2594---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 2595# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=ANONYMOUS 2596SET GTID_NEXT = 'ANONYMOUS'; 2597BEGIN; INSERT INTO t0 VALUES (1);; 2598error ER_GTID_UNSAFE_CREATE_SELECT 2599CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 2600ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2601include/assert.inc [One warning/error should be generated.] 2602include/assert.inc [It should be an Error, not a Warning.] 2603include/assert.inc [Text should be "violates GTID consistency"] 2604include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2605include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2606ROLLBACK; 2607SET GTID_NEXT = 'AUTOMATIC'; 2608include/assert.inc [Both counters should be 0] 2609DROP TABLE IF EXISTS t1; 2610Warnings: 2611Note 1051 Unknown table 'test.t1' 2612---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 2613# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=ANONYMOUS 2614SET GTID_NEXT = 'ANONYMOUS'; 2615BEGIN; INSERT INTO t0 VALUES (1);; 2616error ER_GTID_UNSAFE_CREATE_SELECT 2617CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 2618ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2619include/assert.inc [One warning/error should be generated.] 2620include/assert.inc [It should be an Error, not a Warning.] 2621include/assert.inc [Text should be "violates GTID consistency"] 2622include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2623include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2624ROLLBACK; 2625SET GTID_NEXT = 'AUTOMATIC'; 2626include/assert.inc [Both counters should be 0] 2627DROP TABLE IF EXISTS t1; 2628Warnings: 2629Note 1051 Unknown table 'test.t1' 2630DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 2631######## ENFORCE_GTID_CONSISTENCY=ERROR GTID_MODE=OFF_PERMISSIVE GTID_NEXT=GTID ######## 2632CREATE TABLE t0 (a INT) ENGINE = InnoDB; 2633CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 2634CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 2635CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 2636CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 2637INSERT INTO nonempty_innodb VALUES (1); 2638INSERT INTO nonempty_myisam VALUES (1); 2639---- CREATE ... SELECT (value, 1 row) ---- 2640# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=GTID 2641SET GTID_NEXT = 'GTID'; 2642error ER_GTID_UNSAFE_CREATE_SELECT 2643CREATE TABLE t1 (a INT) SELECT 1; 2644ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2645include/assert.inc [One warning/error should be generated.] 2646include/assert.inc [It should be an Error, not a Warning.] 2647include/assert.inc [Text should be "violates GTID consistency"] 2648include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2649include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2650ROLLBACK; 2651SET GTID_NEXT = 'AUTOMATIC'; 2652include/assert.inc [Both counters should be 0] 2653DROP TABLE IF EXISTS t1; 2654Warnings: 2655Note 1051 Unknown table 'test.t1' 2656---- CREATE ... SELECT (InnoDB, 1 row) ---- 2657# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=GTID 2658SET GTID_NEXT = 'GTID'; 2659error ER_GTID_UNSAFE_CREATE_SELECT 2660CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 2661ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2662include/assert.inc [One warning/error should be generated.] 2663include/assert.inc [It should be an Error, not a Warning.] 2664include/assert.inc [Text should be "violates GTID consistency"] 2665include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2666include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2667ROLLBACK; 2668SET GTID_NEXT = 'AUTOMATIC'; 2669include/assert.inc [Both counters should be 0] 2670DROP TABLE IF EXISTS t1; 2671Warnings: 2672Note 1051 Unknown table 'test.t1' 2673---- CREATE ... SELECT (MyISAM, 1 row) ---- 2674# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=GTID 2675SET GTID_NEXT = 'GTID'; 2676error ER_GTID_UNSAFE_CREATE_SELECT 2677CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 2678ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2679include/assert.inc [One warning/error should be generated.] 2680include/assert.inc [It should be an Error, not a Warning.] 2681include/assert.inc [Text should be "violates GTID consistency"] 2682include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2683include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2684ROLLBACK; 2685SET GTID_NEXT = 'AUTOMATIC'; 2686include/assert.inc [Both counters should be 0] 2687DROP TABLE IF EXISTS t1; 2688Warnings: 2689Note 1051 Unknown table 'test.t1' 2690---- CREATE ... SELECT (InnoDB, 0 row) ---- 2691# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=GTID 2692SET GTID_NEXT = 'GTID'; 2693error ER_GTID_UNSAFE_CREATE_SELECT 2694CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 2695ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2696include/assert.inc [One warning/error should be generated.] 2697include/assert.inc [It should be an Error, not a Warning.] 2698include/assert.inc [Text should be "violates GTID consistency"] 2699include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2700include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2701ROLLBACK; 2702SET GTID_NEXT = 'AUTOMATIC'; 2703include/assert.inc [Both counters should be 0] 2704DROP TABLE IF EXISTS t1; 2705Warnings: 2706Note 1051 Unknown table 'test.t1' 2707---- CREATE ... SELECT (MyISAM, 0 row) ---- 2708# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=GTID 2709SET GTID_NEXT = 'GTID'; 2710error ER_GTID_UNSAFE_CREATE_SELECT 2711CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 2712ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2713include/assert.inc [One warning/error should be generated.] 2714include/assert.inc [It should be an Error, not a Warning.] 2715include/assert.inc [Text should be "violates GTID consistency"] 2716include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2717include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2718ROLLBACK; 2719SET GTID_NEXT = 'AUTOMATIC'; 2720include/assert.inc [Both counters should be 0] 2721DROP TABLE IF EXISTS t1; 2722Warnings: 2723Note 1051 Unknown table 'test.t1' 2724---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 2725# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=GTID 2726SET GTID_NEXT = 'GTID'; 2727BEGIN; INSERT INTO t0 VALUES (1);; 2728error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 2729CREATE TABLE t1 (a INT) SELECT 1; 2730ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 2731include/assert.inc [One warning/error should be generated.] 2732include/assert.inc [It should be an Error, not a Warning.] 2733include/assert.inc [Text should be "violates GTID consistency"] 2734include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2735include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2736ROLLBACK; 2737SET GTID_NEXT = 'AUTOMATIC'; 2738include/assert.inc [Both counters should be 0] 2739DROP TABLE IF EXISTS t1; 2740Warnings: 2741Note 1051 Unknown table 'test.t1' 2742---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 2743# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=GTID 2744SET GTID_NEXT = 'GTID'; 2745BEGIN; INSERT INTO t0 VALUES (1);; 2746error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 2747CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 2748ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 2749include/assert.inc [One warning/error should be generated.] 2750include/assert.inc [It should be an Error, not a Warning.] 2751include/assert.inc [Text should be "violates GTID consistency"] 2752include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2753include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2754ROLLBACK; 2755SET GTID_NEXT = 'AUTOMATIC'; 2756include/assert.inc [Both counters should be 0] 2757DROP TABLE IF EXISTS t1; 2758Warnings: 2759Note 1051 Unknown table 'test.t1' 2760---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 2761# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=GTID 2762SET GTID_NEXT = 'GTID'; 2763BEGIN; INSERT INTO t0 VALUES (1);; 2764error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 2765CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 2766ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 2767include/assert.inc [One warning/error should be generated.] 2768include/assert.inc [It should be an Error, not a Warning.] 2769include/assert.inc [Text should be "violates GTID consistency"] 2770include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2771include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2772ROLLBACK; 2773SET GTID_NEXT = 'AUTOMATIC'; 2774include/assert.inc [Both counters should be 0] 2775DROP TABLE IF EXISTS t1; 2776Warnings: 2777Note 1051 Unknown table 'test.t1' 2778---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 2779# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=GTID 2780SET GTID_NEXT = 'GTID'; 2781BEGIN; INSERT INTO t0 VALUES (1);; 2782error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 2783CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 2784ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 2785include/assert.inc [One warning/error should be generated.] 2786include/assert.inc [It should be an Error, not a Warning.] 2787include/assert.inc [Text should be "violates GTID consistency"] 2788include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2789include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2790ROLLBACK; 2791SET GTID_NEXT = 'AUTOMATIC'; 2792include/assert.inc [Both counters should be 0] 2793DROP TABLE IF EXISTS t1; 2794Warnings: 2795Note 1051 Unknown table 'test.t1' 2796---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 2797# enforce_gtid_consistency=1 gtid_mode=1 gtid_next=GTID 2798SET GTID_NEXT = 'GTID'; 2799BEGIN; INSERT INTO t0 VALUES (1);; 2800error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 2801CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 2802ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 2803include/assert.inc [One warning/error should be generated.] 2804include/assert.inc [It should be an Error, not a Warning.] 2805include/assert.inc [Text should be "violates GTID consistency"] 2806include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2807include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2808ROLLBACK; 2809SET GTID_NEXT = 'AUTOMATIC'; 2810include/assert.inc [Both counters should be 0] 2811DROP TABLE IF EXISTS t1; 2812Warnings: 2813Note 1051 Unknown table 'test.t1' 2814DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 2815SET GLOBAL GTID_MODE = 0; 2816######## ENFORCE_GTID_CONSISTENCY=ERROR GTID_MODE=OFF GTID_NEXT=AUTOMATIC ######## 2817CREATE TABLE t0 (a INT) ENGINE = InnoDB; 2818CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 2819CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 2820CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 2821CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 2822INSERT INTO nonempty_innodb VALUES (1); 2823INSERT INTO nonempty_myisam VALUES (1); 2824---- CREATE ... SELECT (value, 1 row) ---- 2825# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=AUTOMATIC 2826SET GTID_NEXT = 'AUTOMATIC'; 2827error ER_GTID_UNSAFE_CREATE_SELECT 2828CREATE TABLE t1 (a INT) SELECT 1; 2829ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2830include/assert.inc [One warning/error should be generated.] 2831include/assert.inc [It should be an Error, not a Warning.] 2832include/assert.inc [Text should be "violates GTID consistency"] 2833include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2834include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2835ROLLBACK; 2836SET GTID_NEXT = 'AUTOMATIC'; 2837include/assert.inc [Both counters should be 0] 2838DROP TABLE IF EXISTS t1; 2839Warnings: 2840Note 1051 Unknown table 'test.t1' 2841---- CREATE ... SELECT (InnoDB, 1 row) ---- 2842# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=AUTOMATIC 2843SET GTID_NEXT = 'AUTOMATIC'; 2844error ER_GTID_UNSAFE_CREATE_SELECT 2845CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 2846ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2847include/assert.inc [One warning/error should be generated.] 2848include/assert.inc [It should be an Error, not a Warning.] 2849include/assert.inc [Text should be "violates GTID consistency"] 2850include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2851include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2852ROLLBACK; 2853SET GTID_NEXT = 'AUTOMATIC'; 2854include/assert.inc [Both counters should be 0] 2855DROP TABLE IF EXISTS t1; 2856Warnings: 2857Note 1051 Unknown table 'test.t1' 2858---- CREATE ... SELECT (MyISAM, 1 row) ---- 2859# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=AUTOMATIC 2860SET GTID_NEXT = 'AUTOMATIC'; 2861error ER_GTID_UNSAFE_CREATE_SELECT 2862CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 2863ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2864include/assert.inc [One warning/error should be generated.] 2865include/assert.inc [It should be an Error, not a Warning.] 2866include/assert.inc [Text should be "violates GTID consistency"] 2867include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2868include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2869ROLLBACK; 2870SET GTID_NEXT = 'AUTOMATIC'; 2871include/assert.inc [Both counters should be 0] 2872DROP TABLE IF EXISTS t1; 2873Warnings: 2874Note 1051 Unknown table 'test.t1' 2875---- CREATE ... SELECT (InnoDB, 0 row) ---- 2876# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=AUTOMATIC 2877SET GTID_NEXT = 'AUTOMATIC'; 2878error ER_GTID_UNSAFE_CREATE_SELECT 2879CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 2880ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2881include/assert.inc [One warning/error should be generated.] 2882include/assert.inc [It should be an Error, not a Warning.] 2883include/assert.inc [Text should be "violates GTID consistency"] 2884include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2885include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2886ROLLBACK; 2887SET GTID_NEXT = 'AUTOMATIC'; 2888include/assert.inc [Both counters should be 0] 2889DROP TABLE IF EXISTS t1; 2890Warnings: 2891Note 1051 Unknown table 'test.t1' 2892---- CREATE ... SELECT (MyISAM, 0 row) ---- 2893# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=AUTOMATIC 2894SET GTID_NEXT = 'AUTOMATIC'; 2895error ER_GTID_UNSAFE_CREATE_SELECT 2896CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 2897ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2898include/assert.inc [One warning/error should be generated.] 2899include/assert.inc [It should be an Error, not a Warning.] 2900include/assert.inc [Text should be "violates GTID consistency"] 2901include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2902include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2903ROLLBACK; 2904SET GTID_NEXT = 'AUTOMATIC'; 2905include/assert.inc [Both counters should be 0] 2906DROP TABLE IF EXISTS t1; 2907Warnings: 2908Note 1051 Unknown table 'test.t1' 2909---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 2910# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=AUTOMATIC 2911SET GTID_NEXT = 'AUTOMATIC'; 2912BEGIN; INSERT INTO t0 VALUES (1);; 2913error ER_GTID_UNSAFE_CREATE_SELECT 2914CREATE TABLE t1 (a INT) SELECT 1; 2915ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2916include/assert.inc [One warning/error should be generated.] 2917include/assert.inc [It should be an Error, not a Warning.] 2918include/assert.inc [Text should be "violates GTID consistency"] 2919include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2920include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2921ROLLBACK; 2922SET GTID_NEXT = 'AUTOMATIC'; 2923include/assert.inc [Both counters should be 0] 2924DROP TABLE IF EXISTS t1; 2925Warnings: 2926Note 1051 Unknown table 'test.t1' 2927---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 2928# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=AUTOMATIC 2929SET GTID_NEXT = 'AUTOMATIC'; 2930BEGIN; INSERT INTO t0 VALUES (1);; 2931error ER_GTID_UNSAFE_CREATE_SELECT 2932CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 2933ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2934include/assert.inc [One warning/error should be generated.] 2935include/assert.inc [It should be an Error, not a Warning.] 2936include/assert.inc [Text should be "violates GTID consistency"] 2937include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2938include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2939ROLLBACK; 2940SET GTID_NEXT = 'AUTOMATIC'; 2941include/assert.inc [Both counters should be 0] 2942DROP TABLE IF EXISTS t1; 2943Warnings: 2944Note 1051 Unknown table 'test.t1' 2945---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 2946# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=AUTOMATIC 2947SET GTID_NEXT = 'AUTOMATIC'; 2948BEGIN; INSERT INTO t0 VALUES (1);; 2949error ER_GTID_UNSAFE_CREATE_SELECT 2950CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 2951ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2952include/assert.inc [One warning/error should be generated.] 2953include/assert.inc [It should be an Error, not a Warning.] 2954include/assert.inc [Text should be "violates GTID consistency"] 2955include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2956include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2957ROLLBACK; 2958SET GTID_NEXT = 'AUTOMATIC'; 2959include/assert.inc [Both counters should be 0] 2960DROP TABLE IF EXISTS t1; 2961Warnings: 2962Note 1051 Unknown table 'test.t1' 2963---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 2964# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=AUTOMATIC 2965SET GTID_NEXT = 'AUTOMATIC'; 2966BEGIN; INSERT INTO t0 VALUES (1);; 2967error ER_GTID_UNSAFE_CREATE_SELECT 2968CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 2969ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2970include/assert.inc [One warning/error should be generated.] 2971include/assert.inc [It should be an Error, not a Warning.] 2972include/assert.inc [Text should be "violates GTID consistency"] 2973include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2974include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2975ROLLBACK; 2976SET GTID_NEXT = 'AUTOMATIC'; 2977include/assert.inc [Both counters should be 0] 2978DROP TABLE IF EXISTS t1; 2979Warnings: 2980Note 1051 Unknown table 'test.t1' 2981---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 2982# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=AUTOMATIC 2983SET GTID_NEXT = 'AUTOMATIC'; 2984BEGIN; INSERT INTO t0 VALUES (1);; 2985error ER_GTID_UNSAFE_CREATE_SELECT 2986CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 2987ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 2988include/assert.inc [One warning/error should be generated.] 2989include/assert.inc [It should be an Error, not a Warning.] 2990include/assert.inc [Text should be "violates GTID consistency"] 2991include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2992include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 2993ROLLBACK; 2994SET GTID_NEXT = 'AUTOMATIC'; 2995include/assert.inc [Both counters should be 0] 2996DROP TABLE IF EXISTS t1; 2997Warnings: 2998Note 1051 Unknown table 'test.t1' 2999DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 3000######## ENFORCE_GTID_CONSISTENCY=ERROR GTID_MODE=OFF GTID_NEXT=ANONYMOUS ######## 3001CREATE TABLE t0 (a INT) ENGINE = InnoDB; 3002CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 3003CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 3004CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 3005CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 3006INSERT INTO nonempty_innodb VALUES (1); 3007INSERT INTO nonempty_myisam VALUES (1); 3008---- CREATE ... SELECT (value, 1 row) ---- 3009# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=ANONYMOUS 3010SET GTID_NEXT = 'ANONYMOUS'; 3011error ER_GTID_UNSAFE_CREATE_SELECT 3012CREATE TABLE t1 (a INT) SELECT 1; 3013ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3014include/assert.inc [One warning/error should be generated.] 3015include/assert.inc [It should be an Error, not a Warning.] 3016include/assert.inc [Text should be "violates GTID consistency"] 3017include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3018include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3019ROLLBACK; 3020SET GTID_NEXT = 'AUTOMATIC'; 3021include/assert.inc [Both counters should be 0] 3022DROP TABLE IF EXISTS t1; 3023Warnings: 3024Note 1051 Unknown table 'test.t1' 3025---- CREATE ... SELECT (InnoDB, 1 row) ---- 3026# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=ANONYMOUS 3027SET GTID_NEXT = 'ANONYMOUS'; 3028error ER_GTID_UNSAFE_CREATE_SELECT 3029CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3030ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3031include/assert.inc [One warning/error should be generated.] 3032include/assert.inc [It should be an Error, not a Warning.] 3033include/assert.inc [Text should be "violates GTID consistency"] 3034include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3035include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3036ROLLBACK; 3037SET GTID_NEXT = 'AUTOMATIC'; 3038include/assert.inc [Both counters should be 0] 3039DROP TABLE IF EXISTS t1; 3040Warnings: 3041Note 1051 Unknown table 'test.t1' 3042---- CREATE ... SELECT (MyISAM, 1 row) ---- 3043# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=ANONYMOUS 3044SET GTID_NEXT = 'ANONYMOUS'; 3045error ER_GTID_UNSAFE_CREATE_SELECT 3046CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3047ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3048include/assert.inc [One warning/error should be generated.] 3049include/assert.inc [It should be an Error, not a Warning.] 3050include/assert.inc [Text should be "violates GTID consistency"] 3051include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3052include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3053ROLLBACK; 3054SET GTID_NEXT = 'AUTOMATIC'; 3055include/assert.inc [Both counters should be 0] 3056DROP TABLE IF EXISTS t1; 3057Warnings: 3058Note 1051 Unknown table 'test.t1' 3059---- CREATE ... SELECT (InnoDB, 0 row) ---- 3060# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=ANONYMOUS 3061SET GTID_NEXT = 'ANONYMOUS'; 3062error ER_GTID_UNSAFE_CREATE_SELECT 3063CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3064ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3065include/assert.inc [One warning/error should be generated.] 3066include/assert.inc [It should be an Error, not a Warning.] 3067include/assert.inc [Text should be "violates GTID consistency"] 3068include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3069include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3070ROLLBACK; 3071SET GTID_NEXT = 'AUTOMATIC'; 3072include/assert.inc [Both counters should be 0] 3073DROP TABLE IF EXISTS t1; 3074Warnings: 3075Note 1051 Unknown table 'test.t1' 3076---- CREATE ... SELECT (MyISAM, 0 row) ---- 3077# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=ANONYMOUS 3078SET GTID_NEXT = 'ANONYMOUS'; 3079error ER_GTID_UNSAFE_CREATE_SELECT 3080CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3081ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3082include/assert.inc [One warning/error should be generated.] 3083include/assert.inc [It should be an Error, not a Warning.] 3084include/assert.inc [Text should be "violates GTID consistency"] 3085include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3086include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3087ROLLBACK; 3088SET GTID_NEXT = 'AUTOMATIC'; 3089include/assert.inc [Both counters should be 0] 3090DROP TABLE IF EXISTS t1; 3091Warnings: 3092Note 1051 Unknown table 'test.t1' 3093---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 3094# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=ANONYMOUS 3095SET GTID_NEXT = 'ANONYMOUS'; 3096BEGIN; INSERT INTO t0 VALUES (1);; 3097error ER_GTID_UNSAFE_CREATE_SELECT 3098CREATE TABLE t1 (a INT) SELECT 1; 3099ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3100include/assert.inc [One warning/error should be generated.] 3101include/assert.inc [It should be an Error, not a Warning.] 3102include/assert.inc [Text should be "violates GTID consistency"] 3103include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3104include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3105ROLLBACK; 3106SET GTID_NEXT = 'AUTOMATIC'; 3107include/assert.inc [Both counters should be 0] 3108DROP TABLE IF EXISTS t1; 3109Warnings: 3110Note 1051 Unknown table 'test.t1' 3111---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 3112# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=ANONYMOUS 3113SET GTID_NEXT = 'ANONYMOUS'; 3114BEGIN; INSERT INTO t0 VALUES (1);; 3115error ER_GTID_UNSAFE_CREATE_SELECT 3116CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3117ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3118include/assert.inc [One warning/error should be generated.] 3119include/assert.inc [It should be an Error, not a Warning.] 3120include/assert.inc [Text should be "violates GTID consistency"] 3121include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3122include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3123ROLLBACK; 3124SET GTID_NEXT = 'AUTOMATIC'; 3125include/assert.inc [Both counters should be 0] 3126DROP TABLE IF EXISTS t1; 3127Warnings: 3128Note 1051 Unknown table 'test.t1' 3129---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 3130# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=ANONYMOUS 3131SET GTID_NEXT = 'ANONYMOUS'; 3132BEGIN; INSERT INTO t0 VALUES (1);; 3133error ER_GTID_UNSAFE_CREATE_SELECT 3134CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3135ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3136include/assert.inc [One warning/error should be generated.] 3137include/assert.inc [It should be an Error, not a Warning.] 3138include/assert.inc [Text should be "violates GTID consistency"] 3139include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3140include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3141ROLLBACK; 3142SET GTID_NEXT = 'AUTOMATIC'; 3143include/assert.inc [Both counters should be 0] 3144DROP TABLE IF EXISTS t1; 3145Warnings: 3146Note 1051 Unknown table 'test.t1' 3147---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 3148# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=ANONYMOUS 3149SET GTID_NEXT = 'ANONYMOUS'; 3150BEGIN; INSERT INTO t0 VALUES (1);; 3151error ER_GTID_UNSAFE_CREATE_SELECT 3152CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3153ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3154include/assert.inc [One warning/error should be generated.] 3155include/assert.inc [It should be an Error, not a Warning.] 3156include/assert.inc [Text should be "violates GTID consistency"] 3157include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3158include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3159ROLLBACK; 3160SET GTID_NEXT = 'AUTOMATIC'; 3161include/assert.inc [Both counters should be 0] 3162DROP TABLE IF EXISTS t1; 3163Warnings: 3164Note 1051 Unknown table 'test.t1' 3165---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 3166# enforce_gtid_consistency=1 gtid_mode=0 gtid_next=ANONYMOUS 3167SET GTID_NEXT = 'ANONYMOUS'; 3168BEGIN; INSERT INTO t0 VALUES (1);; 3169error ER_GTID_UNSAFE_CREATE_SELECT 3170CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3171ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3172include/assert.inc [One warning/error should be generated.] 3173include/assert.inc [It should be an Error, not a Warning.] 3174include/assert.inc [Text should be "violates GTID consistency"] 3175include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3176include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3177ROLLBACK; 3178SET GTID_NEXT = 'AUTOMATIC'; 3179include/assert.inc [Both counters should be 0] 3180DROP TABLE IF EXISTS t1; 3181Warnings: 3182Note 1051 Unknown table 'test.t1' 3183DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 3184SET GLOBAL ENFORCE_GTID_CONSISTENCY = 2; 3185SET GLOBAL GTID_MODE = OFF_PERMISSIVE; 3186SET GLOBAL GTID_MODE = ON_PERMISSIVE; 3187SET GLOBAL GTID_MODE = 2; 3188######## ENFORCE_GTID_CONSISTENCY=WARN GTID_MODE=ON_PERMISSIVE GTID_NEXT=AUTOMATIC ######## 3189CREATE TABLE t0 (a INT) ENGINE = InnoDB; 3190CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 3191CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 3192CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 3193CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 3194INSERT INTO nonempty_innodb VALUES (1); 3195INSERT INTO nonempty_myisam VALUES (1); 3196---- CREATE ... SELECT (value, 1 row) ---- 3197# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=AUTOMATIC 3198SET GTID_NEXT = 'AUTOMATIC'; 3199error ER_GTID_UNSAFE_CREATE_SELECT 3200CREATE TABLE t1 (a INT) SELECT 1; 3201ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3202include/assert.inc [One warning/error should be generated.] 3203include/assert.inc [It should be an Error, not a Warning.] 3204include/assert.inc [Text should be "violates GTID consistency"] 3205include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3206include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3207ROLLBACK; 3208SET GTID_NEXT = 'AUTOMATIC'; 3209include/assert.inc [Both counters should be 0] 3210DROP TABLE IF EXISTS t1; 3211Warnings: 3212Note 1051 Unknown table 'test.t1' 3213---- CREATE ... SELECT (InnoDB, 1 row) ---- 3214# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=AUTOMATIC 3215SET GTID_NEXT = 'AUTOMATIC'; 3216error ER_GTID_UNSAFE_CREATE_SELECT 3217CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3218ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3219include/assert.inc [One warning/error should be generated.] 3220include/assert.inc [It should be an Error, not a Warning.] 3221include/assert.inc [Text should be "violates GTID consistency"] 3222include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3223include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3224ROLLBACK; 3225SET GTID_NEXT = 'AUTOMATIC'; 3226include/assert.inc [Both counters should be 0] 3227DROP TABLE IF EXISTS t1; 3228Warnings: 3229Note 1051 Unknown table 'test.t1' 3230---- CREATE ... SELECT (MyISAM, 1 row) ---- 3231# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=AUTOMATIC 3232SET GTID_NEXT = 'AUTOMATIC'; 3233error ER_GTID_UNSAFE_CREATE_SELECT 3234CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3235ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3236include/assert.inc [One warning/error should be generated.] 3237include/assert.inc [It should be an Error, not a Warning.] 3238include/assert.inc [Text should be "violates GTID consistency"] 3239include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3240include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3241ROLLBACK; 3242SET GTID_NEXT = 'AUTOMATIC'; 3243include/assert.inc [Both counters should be 0] 3244DROP TABLE IF EXISTS t1; 3245Warnings: 3246Note 1051 Unknown table 'test.t1' 3247---- CREATE ... SELECT (InnoDB, 0 row) ---- 3248# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=AUTOMATIC 3249SET GTID_NEXT = 'AUTOMATIC'; 3250error ER_GTID_UNSAFE_CREATE_SELECT 3251CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3252ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3253include/assert.inc [One warning/error should be generated.] 3254include/assert.inc [It should be an Error, not a Warning.] 3255include/assert.inc [Text should be "violates GTID consistency"] 3256include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3257include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3258ROLLBACK; 3259SET GTID_NEXT = 'AUTOMATIC'; 3260include/assert.inc [Both counters should be 0] 3261DROP TABLE IF EXISTS t1; 3262Warnings: 3263Note 1051 Unknown table 'test.t1' 3264---- CREATE ... SELECT (MyISAM, 0 row) ---- 3265# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=AUTOMATIC 3266SET GTID_NEXT = 'AUTOMATIC'; 3267error ER_GTID_UNSAFE_CREATE_SELECT 3268CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3269ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3270include/assert.inc [One warning/error should be generated.] 3271include/assert.inc [It should be an Error, not a Warning.] 3272include/assert.inc [Text should be "violates GTID consistency"] 3273include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3274include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3275ROLLBACK; 3276SET GTID_NEXT = 'AUTOMATIC'; 3277include/assert.inc [Both counters should be 0] 3278DROP TABLE IF EXISTS t1; 3279Warnings: 3280Note 1051 Unknown table 'test.t1' 3281---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 3282# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=AUTOMATIC 3283SET GTID_NEXT = 'AUTOMATIC'; 3284BEGIN; INSERT INTO t0 VALUES (1);; 3285error ER_GTID_UNSAFE_CREATE_SELECT 3286CREATE TABLE t1 (a INT) SELECT 1; 3287ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3288include/assert.inc [One warning/error should be generated.] 3289include/assert.inc [It should be an Error, not a Warning.] 3290include/assert.inc [Text should be "violates GTID consistency"] 3291include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3292include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3293ROLLBACK; 3294SET GTID_NEXT = 'AUTOMATIC'; 3295include/assert.inc [Both counters should be 0] 3296DROP TABLE IF EXISTS t1; 3297Warnings: 3298Note 1051 Unknown table 'test.t1' 3299---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 3300# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=AUTOMATIC 3301SET GTID_NEXT = 'AUTOMATIC'; 3302BEGIN; INSERT INTO t0 VALUES (1);; 3303error ER_GTID_UNSAFE_CREATE_SELECT 3304CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3305ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3306include/assert.inc [One warning/error should be generated.] 3307include/assert.inc [It should be an Error, not a Warning.] 3308include/assert.inc [Text should be "violates GTID consistency"] 3309include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3310include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3311ROLLBACK; 3312SET GTID_NEXT = 'AUTOMATIC'; 3313include/assert.inc [Both counters should be 0] 3314DROP TABLE IF EXISTS t1; 3315Warnings: 3316Note 1051 Unknown table 'test.t1' 3317---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 3318# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=AUTOMATIC 3319SET GTID_NEXT = 'AUTOMATIC'; 3320BEGIN; INSERT INTO t0 VALUES (1);; 3321error ER_GTID_UNSAFE_CREATE_SELECT 3322CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3323ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3324include/assert.inc [One warning/error should be generated.] 3325include/assert.inc [It should be an Error, not a Warning.] 3326include/assert.inc [Text should be "violates GTID consistency"] 3327include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3328include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3329ROLLBACK; 3330SET GTID_NEXT = 'AUTOMATIC'; 3331include/assert.inc [Both counters should be 0] 3332DROP TABLE IF EXISTS t1; 3333Warnings: 3334Note 1051 Unknown table 'test.t1' 3335---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 3336# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=AUTOMATIC 3337SET GTID_NEXT = 'AUTOMATIC'; 3338BEGIN; INSERT INTO t0 VALUES (1);; 3339error ER_GTID_UNSAFE_CREATE_SELECT 3340CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3341ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3342include/assert.inc [One warning/error should be generated.] 3343include/assert.inc [It should be an Error, not a Warning.] 3344include/assert.inc [Text should be "violates GTID consistency"] 3345include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3346include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3347ROLLBACK; 3348SET GTID_NEXT = 'AUTOMATIC'; 3349include/assert.inc [Both counters should be 0] 3350DROP TABLE IF EXISTS t1; 3351Warnings: 3352Note 1051 Unknown table 'test.t1' 3353---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 3354# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=AUTOMATIC 3355SET GTID_NEXT = 'AUTOMATIC'; 3356BEGIN; INSERT INTO t0 VALUES (1);; 3357error ER_GTID_UNSAFE_CREATE_SELECT 3358CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3359ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3360include/assert.inc [One warning/error should be generated.] 3361include/assert.inc [It should be an Error, not a Warning.] 3362include/assert.inc [Text should be "violates GTID consistency"] 3363include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3364include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3365ROLLBACK; 3366SET GTID_NEXT = 'AUTOMATIC'; 3367include/assert.inc [Both counters should be 0] 3368DROP TABLE IF EXISTS t1; 3369Warnings: 3370Note 1051 Unknown table 'test.t1' 3371DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 3372######## ENFORCE_GTID_CONSISTENCY=WARN GTID_MODE=ON_PERMISSIVE GTID_NEXT=ANONYMOUS ######## 3373CREATE TABLE t0 (a INT) ENGINE = InnoDB; 3374CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 3375CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 3376CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 3377CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 3378INSERT INTO nonempty_innodb VALUES (1); 3379INSERT INTO nonempty_myisam VALUES (1); 3380---- CREATE ... SELECT (value, 1 row) ---- 3381# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=ANONYMOUS 3382SET GTID_NEXT = 'ANONYMOUS'; 3383[START] CREATE TABLE t1 (a INT) SELECT 1; 3384include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3385include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3386[END] CREATE TABLE t1 (a INT) SELECT 1; 3387Warnings: 3388Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3389include/assert.inc [One warning/error should be generated.] 3390include/assert.inc [It should be a Warning, not an Error.] 3391include/assert.inc [Text should be "violates GTID consistency"] 3392include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3393include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3394ROLLBACK; 3395SET GTID_NEXT = 'AUTOMATIC'; 3396include/assert.inc [Both counters should be 0] 3397DROP TABLE IF EXISTS t1; 3398---- CREATE ... SELECT (InnoDB, 1 row) ---- 3399# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=ANONYMOUS 3400SET GTID_NEXT = 'ANONYMOUS'; 3401[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3402include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3403include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3404[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3405Warnings: 3406Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3407include/assert.inc [One warning/error should be generated.] 3408include/assert.inc [It should be a Warning, not an Error.] 3409include/assert.inc [Text should be "violates GTID consistency"] 3410include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3411include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3412ROLLBACK; 3413SET GTID_NEXT = 'AUTOMATIC'; 3414include/assert.inc [Both counters should be 0] 3415DROP TABLE IF EXISTS t1; 3416---- CREATE ... SELECT (MyISAM, 1 row) ---- 3417# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=ANONYMOUS 3418SET GTID_NEXT = 'ANONYMOUS'; 3419[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3420include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3421include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3422[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3423Warnings: 3424Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3425include/assert.inc [One warning/error should be generated.] 3426include/assert.inc [It should be a Warning, not an Error.] 3427include/assert.inc [Text should be "violates GTID consistency"] 3428include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3429include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3430ROLLBACK; 3431SET GTID_NEXT = 'AUTOMATIC'; 3432include/assert.inc [Both counters should be 0] 3433DROP TABLE IF EXISTS t1; 3434---- CREATE ... SELECT (InnoDB, 0 row) ---- 3435# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=ANONYMOUS 3436SET GTID_NEXT = 'ANONYMOUS'; 3437[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3438include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3439include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3440[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3441Warnings: 3442Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3443include/assert.inc [One warning/error should be generated.] 3444include/assert.inc [It should be a Warning, not an Error.] 3445include/assert.inc [Text should be "violates GTID consistency"] 3446include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3447include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3448ROLLBACK; 3449SET GTID_NEXT = 'AUTOMATIC'; 3450include/assert.inc [Both counters should be 0] 3451DROP TABLE IF EXISTS t1; 3452---- CREATE ... SELECT (MyISAM, 0 row) ---- 3453# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=ANONYMOUS 3454SET GTID_NEXT = 'ANONYMOUS'; 3455[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3456include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3457include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3458[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3459Warnings: 3460Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3461include/assert.inc [One warning/error should be generated.] 3462include/assert.inc [It should be a Warning, not an Error.] 3463include/assert.inc [Text should be "violates GTID consistency"] 3464include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3465include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3466ROLLBACK; 3467SET GTID_NEXT = 'AUTOMATIC'; 3468include/assert.inc [Both counters should be 0] 3469DROP TABLE IF EXISTS t1; 3470---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 3471# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=ANONYMOUS 3472SET GTID_NEXT = 'ANONYMOUS'; 3473BEGIN; INSERT INTO t0 VALUES (1);; 3474[START] CREATE TABLE t1 (a INT) SELECT 1; 3475include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3476include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3477[END] CREATE TABLE t1 (a INT) SELECT 1; 3478Warnings: 3479Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3480include/assert.inc [One warning/error should be generated.] 3481include/assert.inc [It should be a Warning, not an Error.] 3482include/assert.inc [Text should be "violates GTID consistency"] 3483include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3484include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3485ROLLBACK; 3486SET GTID_NEXT = 'AUTOMATIC'; 3487include/assert.inc [Both counters should be 0] 3488DROP TABLE IF EXISTS t1; 3489---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 3490# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=ANONYMOUS 3491SET GTID_NEXT = 'ANONYMOUS'; 3492BEGIN; INSERT INTO t0 VALUES (1);; 3493[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3494include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3495include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3496[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3497Warnings: 3498Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3499include/assert.inc [One warning/error should be generated.] 3500include/assert.inc [It should be a Warning, not an Error.] 3501include/assert.inc [Text should be "violates GTID consistency"] 3502include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3503include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3504ROLLBACK; 3505SET GTID_NEXT = 'AUTOMATIC'; 3506include/assert.inc [Both counters should be 0] 3507DROP TABLE IF EXISTS t1; 3508---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 3509# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=ANONYMOUS 3510SET GTID_NEXT = 'ANONYMOUS'; 3511BEGIN; INSERT INTO t0 VALUES (1);; 3512[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3513include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3514include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3515[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3516Warnings: 3517Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3518include/assert.inc [One warning/error should be generated.] 3519include/assert.inc [It should be a Warning, not an Error.] 3520include/assert.inc [Text should be "violates GTID consistency"] 3521include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3522include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3523ROLLBACK; 3524SET GTID_NEXT = 'AUTOMATIC'; 3525include/assert.inc [Both counters should be 0] 3526DROP TABLE IF EXISTS t1; 3527---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 3528# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=ANONYMOUS 3529SET GTID_NEXT = 'ANONYMOUS'; 3530BEGIN; INSERT INTO t0 VALUES (1);; 3531[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3532include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3533include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3534[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3535Warnings: 3536Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3537include/assert.inc [One warning/error should be generated.] 3538include/assert.inc [It should be a Warning, not an Error.] 3539include/assert.inc [Text should be "violates GTID consistency"] 3540include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3541include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3542ROLLBACK; 3543SET GTID_NEXT = 'AUTOMATIC'; 3544include/assert.inc [Both counters should be 0] 3545DROP TABLE IF EXISTS t1; 3546---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 3547# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=ANONYMOUS 3548SET GTID_NEXT = 'ANONYMOUS'; 3549BEGIN; INSERT INTO t0 VALUES (1);; 3550[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3551include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3552include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3553[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3554Warnings: 3555Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3556include/assert.inc [One warning/error should be generated.] 3557include/assert.inc [It should be a Warning, not an Error.] 3558include/assert.inc [Text should be "violates GTID consistency"] 3559include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3560include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3561ROLLBACK; 3562SET GTID_NEXT = 'AUTOMATIC'; 3563include/assert.inc [Both counters should be 0] 3564DROP TABLE IF EXISTS t1; 3565DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 3566######## ENFORCE_GTID_CONSISTENCY=WARN GTID_MODE=ON_PERMISSIVE GTID_NEXT=GTID ######## 3567CREATE TABLE t0 (a INT) ENGINE = InnoDB; 3568CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 3569CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 3570CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 3571CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 3572INSERT INTO nonempty_innodb VALUES (1); 3573INSERT INTO nonempty_myisam VALUES (1); 3574---- CREATE ... SELECT (value, 1 row) ---- 3575# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=GTID 3576SET GTID_NEXT = 'GTID'; 3577error ER_GTID_UNSAFE_CREATE_SELECT 3578CREATE TABLE t1 (a INT) SELECT 1; 3579ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3580include/assert.inc [One warning/error should be generated.] 3581include/assert.inc [It should be an Error, not a Warning.] 3582include/assert.inc [Text should be "violates GTID consistency"] 3583include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3584include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3585ROLLBACK; 3586SET GTID_NEXT = 'AUTOMATIC'; 3587include/assert.inc [Both counters should be 0] 3588DROP TABLE IF EXISTS t1; 3589Warnings: 3590Note 1051 Unknown table 'test.t1' 3591---- CREATE ... SELECT (InnoDB, 1 row) ---- 3592# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=GTID 3593SET GTID_NEXT = 'GTID'; 3594error ER_GTID_UNSAFE_CREATE_SELECT 3595CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3596ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3597include/assert.inc [One warning/error should be generated.] 3598include/assert.inc [It should be an Error, not a Warning.] 3599include/assert.inc [Text should be "violates GTID consistency"] 3600include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3601include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3602ROLLBACK; 3603SET GTID_NEXT = 'AUTOMATIC'; 3604include/assert.inc [Both counters should be 0] 3605DROP TABLE IF EXISTS t1; 3606Warnings: 3607Note 1051 Unknown table 'test.t1' 3608---- CREATE ... SELECT (MyISAM, 1 row) ---- 3609# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=GTID 3610SET GTID_NEXT = 'GTID'; 3611error ER_GTID_UNSAFE_CREATE_SELECT 3612CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3613ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3614include/assert.inc [One warning/error should be generated.] 3615include/assert.inc [It should be an Error, not a Warning.] 3616include/assert.inc [Text should be "violates GTID consistency"] 3617include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3618include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3619ROLLBACK; 3620SET GTID_NEXT = 'AUTOMATIC'; 3621include/assert.inc [Both counters should be 0] 3622DROP TABLE IF EXISTS t1; 3623Warnings: 3624Note 1051 Unknown table 'test.t1' 3625---- CREATE ... SELECT (InnoDB, 0 row) ---- 3626# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=GTID 3627SET GTID_NEXT = 'GTID'; 3628error ER_GTID_UNSAFE_CREATE_SELECT 3629CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3630ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3631include/assert.inc [One warning/error should be generated.] 3632include/assert.inc [It should be an Error, not a Warning.] 3633include/assert.inc [Text should be "violates GTID consistency"] 3634include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3635include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3636ROLLBACK; 3637SET GTID_NEXT = 'AUTOMATIC'; 3638include/assert.inc [Both counters should be 0] 3639DROP TABLE IF EXISTS t1; 3640Warnings: 3641Note 1051 Unknown table 'test.t1' 3642---- CREATE ... SELECT (MyISAM, 0 row) ---- 3643# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=GTID 3644SET GTID_NEXT = 'GTID'; 3645error ER_GTID_UNSAFE_CREATE_SELECT 3646CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3647ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 3648include/assert.inc [One warning/error should be generated.] 3649include/assert.inc [It should be an Error, not a Warning.] 3650include/assert.inc [Text should be "violates GTID consistency"] 3651include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3652include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3653ROLLBACK; 3654SET GTID_NEXT = 'AUTOMATIC'; 3655include/assert.inc [Both counters should be 0] 3656DROP TABLE IF EXISTS t1; 3657Warnings: 3658Note 1051 Unknown table 'test.t1' 3659---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 3660# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=GTID 3661SET GTID_NEXT = 'GTID'; 3662BEGIN; INSERT INTO t0 VALUES (1);; 3663error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 3664CREATE TABLE t1 (a INT) SELECT 1; 3665ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 3666include/assert.inc [One warning/error should be generated.] 3667include/assert.inc [It should be an Error, not a Warning.] 3668include/assert.inc [Text should be "violates GTID consistency"] 3669include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3670include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3671ROLLBACK; 3672SET GTID_NEXT = 'AUTOMATIC'; 3673include/assert.inc [Both counters should be 0] 3674DROP TABLE IF EXISTS t1; 3675Warnings: 3676Note 1051 Unknown table 'test.t1' 3677---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 3678# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=GTID 3679SET GTID_NEXT = 'GTID'; 3680BEGIN; INSERT INTO t0 VALUES (1);; 3681error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 3682CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3683ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 3684include/assert.inc [One warning/error should be generated.] 3685include/assert.inc [It should be an Error, not a Warning.] 3686include/assert.inc [Text should be "violates GTID consistency"] 3687include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3688include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3689ROLLBACK; 3690SET GTID_NEXT = 'AUTOMATIC'; 3691include/assert.inc [Both counters should be 0] 3692DROP TABLE IF EXISTS t1; 3693Warnings: 3694Note 1051 Unknown table 'test.t1' 3695---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 3696# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=GTID 3697SET GTID_NEXT = 'GTID'; 3698BEGIN; INSERT INTO t0 VALUES (1);; 3699error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 3700CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3701ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 3702include/assert.inc [One warning/error should be generated.] 3703include/assert.inc [It should be an Error, not a Warning.] 3704include/assert.inc [Text should be "violates GTID consistency"] 3705include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3706include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3707ROLLBACK; 3708SET GTID_NEXT = 'AUTOMATIC'; 3709include/assert.inc [Both counters should be 0] 3710DROP TABLE IF EXISTS t1; 3711Warnings: 3712Note 1051 Unknown table 'test.t1' 3713---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 3714# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=GTID 3715SET GTID_NEXT = 'GTID'; 3716BEGIN; INSERT INTO t0 VALUES (1);; 3717error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 3718CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3719ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 3720include/assert.inc [One warning/error should be generated.] 3721include/assert.inc [It should be an Error, not a Warning.] 3722include/assert.inc [Text should be "violates GTID consistency"] 3723include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3724include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3725ROLLBACK; 3726SET GTID_NEXT = 'AUTOMATIC'; 3727include/assert.inc [Both counters should be 0] 3728DROP TABLE IF EXISTS t1; 3729Warnings: 3730Note 1051 Unknown table 'test.t1' 3731---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 3732# enforce_gtid_consistency=2 gtid_mode=2 gtid_next=GTID 3733SET GTID_NEXT = 'GTID'; 3734BEGIN; INSERT INTO t0 VALUES (1);; 3735error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 3736CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3737ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 3738include/assert.inc [One warning/error should be generated.] 3739include/assert.inc [It should be an Error, not a Warning.] 3740include/assert.inc [Text should be "violates GTID consistency"] 3741include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3742include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3743ROLLBACK; 3744SET GTID_NEXT = 'AUTOMATIC'; 3745include/assert.inc [Both counters should be 0] 3746DROP TABLE IF EXISTS t1; 3747Warnings: 3748Note 1051 Unknown table 'test.t1' 3749DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 3750SET GLOBAL GTID_MODE = 1; 3751######## ENFORCE_GTID_CONSISTENCY=WARN GTID_MODE=OFF_PERMISSIVE GTID_NEXT=AUTOMATIC ######## 3752CREATE TABLE t0 (a INT) ENGINE = InnoDB; 3753CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 3754CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 3755CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 3756CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 3757INSERT INTO nonempty_innodb VALUES (1); 3758INSERT INTO nonempty_myisam VALUES (1); 3759---- CREATE ... SELECT (value, 1 row) ---- 3760# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=AUTOMATIC 3761SET GTID_NEXT = 'AUTOMATIC'; 3762[START] CREATE TABLE t1 (a INT) SELECT 1; 3763include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3764include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3765[END] CREATE TABLE t1 (a INT) SELECT 1; 3766Warnings: 3767Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3768include/assert.inc [One warning/error should be generated.] 3769include/assert.inc [It should be a Warning, not an Error.] 3770include/assert.inc [Text should be "violates GTID consistency"] 3771include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3772include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3773ROLLBACK; 3774SET GTID_NEXT = 'AUTOMATIC'; 3775include/assert.inc [Both counters should be 0] 3776DROP TABLE IF EXISTS t1; 3777---- CREATE ... SELECT (InnoDB, 1 row) ---- 3778# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=AUTOMATIC 3779SET GTID_NEXT = 'AUTOMATIC'; 3780[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3781include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3782include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3783[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3784Warnings: 3785Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3786include/assert.inc [One warning/error should be generated.] 3787include/assert.inc [It should be a Warning, not an Error.] 3788include/assert.inc [Text should be "violates GTID consistency"] 3789include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3790include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3791ROLLBACK; 3792SET GTID_NEXT = 'AUTOMATIC'; 3793include/assert.inc [Both counters should be 0] 3794DROP TABLE IF EXISTS t1; 3795---- CREATE ... SELECT (MyISAM, 1 row) ---- 3796# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=AUTOMATIC 3797SET GTID_NEXT = 'AUTOMATIC'; 3798[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3799include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3800include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3801[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3802Warnings: 3803Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3804include/assert.inc [One warning/error should be generated.] 3805include/assert.inc [It should be a Warning, not an Error.] 3806include/assert.inc [Text should be "violates GTID consistency"] 3807include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3808include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3809ROLLBACK; 3810SET GTID_NEXT = 'AUTOMATIC'; 3811include/assert.inc [Both counters should be 0] 3812DROP TABLE IF EXISTS t1; 3813---- CREATE ... SELECT (InnoDB, 0 row) ---- 3814# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=AUTOMATIC 3815SET GTID_NEXT = 'AUTOMATIC'; 3816[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3817include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3818include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3819[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3820Warnings: 3821Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3822include/assert.inc [One warning/error should be generated.] 3823include/assert.inc [It should be a Warning, not an Error.] 3824include/assert.inc [Text should be "violates GTID consistency"] 3825include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3826include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3827ROLLBACK; 3828SET GTID_NEXT = 'AUTOMATIC'; 3829include/assert.inc [Both counters should be 0] 3830DROP TABLE IF EXISTS t1; 3831---- CREATE ... SELECT (MyISAM, 0 row) ---- 3832# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=AUTOMATIC 3833SET GTID_NEXT = 'AUTOMATIC'; 3834[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3835include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3836include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3837[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3838Warnings: 3839Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3840include/assert.inc [One warning/error should be generated.] 3841include/assert.inc [It should be a Warning, not an Error.] 3842include/assert.inc [Text should be "violates GTID consistency"] 3843include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3844include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3845ROLLBACK; 3846SET GTID_NEXT = 'AUTOMATIC'; 3847include/assert.inc [Both counters should be 0] 3848DROP TABLE IF EXISTS t1; 3849---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 3850# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=AUTOMATIC 3851SET GTID_NEXT = 'AUTOMATIC'; 3852BEGIN; INSERT INTO t0 VALUES (1);; 3853[START] CREATE TABLE t1 (a INT) SELECT 1; 3854include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3855include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3856[END] CREATE TABLE t1 (a INT) SELECT 1; 3857Warnings: 3858Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3859include/assert.inc [One warning/error should be generated.] 3860include/assert.inc [It should be a Warning, not an Error.] 3861include/assert.inc [Text should be "violates GTID consistency"] 3862include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3863include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3864ROLLBACK; 3865SET GTID_NEXT = 'AUTOMATIC'; 3866include/assert.inc [Both counters should be 0] 3867DROP TABLE IF EXISTS t1; 3868---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 3869# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=AUTOMATIC 3870SET GTID_NEXT = 'AUTOMATIC'; 3871BEGIN; INSERT INTO t0 VALUES (1);; 3872[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3873include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3874include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3875[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3876Warnings: 3877Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3878include/assert.inc [One warning/error should be generated.] 3879include/assert.inc [It should be a Warning, not an Error.] 3880include/assert.inc [Text should be "violates GTID consistency"] 3881include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3882include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3883ROLLBACK; 3884SET GTID_NEXT = 'AUTOMATIC'; 3885include/assert.inc [Both counters should be 0] 3886DROP TABLE IF EXISTS t1; 3887---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 3888# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=AUTOMATIC 3889SET GTID_NEXT = 'AUTOMATIC'; 3890BEGIN; INSERT INTO t0 VALUES (1);; 3891[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3892include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3893include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3894[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3895Warnings: 3896Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3897include/assert.inc [One warning/error should be generated.] 3898include/assert.inc [It should be a Warning, not an Error.] 3899include/assert.inc [Text should be "violates GTID consistency"] 3900include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3901include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3902ROLLBACK; 3903SET GTID_NEXT = 'AUTOMATIC'; 3904include/assert.inc [Both counters should be 0] 3905DROP TABLE IF EXISTS t1; 3906---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 3907# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=AUTOMATIC 3908SET GTID_NEXT = 'AUTOMATIC'; 3909BEGIN; INSERT INTO t0 VALUES (1);; 3910[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3911include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3912include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3913[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 3914Warnings: 3915Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3916include/assert.inc [One warning/error should be generated.] 3917include/assert.inc [It should be a Warning, not an Error.] 3918include/assert.inc [Text should be "violates GTID consistency"] 3919include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3920include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3921ROLLBACK; 3922SET GTID_NEXT = 'AUTOMATIC'; 3923include/assert.inc [Both counters should be 0] 3924DROP TABLE IF EXISTS t1; 3925---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 3926# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=AUTOMATIC 3927SET GTID_NEXT = 'AUTOMATIC'; 3928BEGIN; INSERT INTO t0 VALUES (1);; 3929[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3930include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3931include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3932[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 3933Warnings: 3934Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3935include/assert.inc [One warning/error should be generated.] 3936include/assert.inc [It should be a Warning, not an Error.] 3937include/assert.inc [Text should be "violates GTID consistency"] 3938include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3939include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3940ROLLBACK; 3941SET GTID_NEXT = 'AUTOMATIC'; 3942include/assert.inc [Both counters should be 0] 3943DROP TABLE IF EXISTS t1; 3944DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 3945######## ENFORCE_GTID_CONSISTENCY=WARN GTID_MODE=OFF_PERMISSIVE GTID_NEXT=ANONYMOUS ######## 3946CREATE TABLE t0 (a INT) ENGINE = InnoDB; 3947CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 3948CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 3949CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 3950CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 3951INSERT INTO nonempty_innodb VALUES (1); 3952INSERT INTO nonempty_myisam VALUES (1); 3953---- CREATE ... SELECT (value, 1 row) ---- 3954# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=ANONYMOUS 3955SET GTID_NEXT = 'ANONYMOUS'; 3956[START] CREATE TABLE t1 (a INT) SELECT 1; 3957include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3958include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3959[END] CREATE TABLE t1 (a INT) SELECT 1; 3960Warnings: 3961Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3962include/assert.inc [One warning/error should be generated.] 3963include/assert.inc [It should be a Warning, not an Error.] 3964include/assert.inc [Text should be "violates GTID consistency"] 3965include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3966include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3967ROLLBACK; 3968SET GTID_NEXT = 'AUTOMATIC'; 3969include/assert.inc [Both counters should be 0] 3970DROP TABLE IF EXISTS t1; 3971---- CREATE ... SELECT (InnoDB, 1 row) ---- 3972# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=ANONYMOUS 3973SET GTID_NEXT = 'ANONYMOUS'; 3974[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3975include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3976include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3977[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 3978Warnings: 3979Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3980include/assert.inc [One warning/error should be generated.] 3981include/assert.inc [It should be a Warning, not an Error.] 3982include/assert.inc [Text should be "violates GTID consistency"] 3983include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3984include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3985ROLLBACK; 3986SET GTID_NEXT = 'AUTOMATIC'; 3987include/assert.inc [Both counters should be 0] 3988DROP TABLE IF EXISTS t1; 3989---- CREATE ... SELECT (MyISAM, 1 row) ---- 3990# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=ANONYMOUS 3991SET GTID_NEXT = 'ANONYMOUS'; 3992[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3993include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 3994include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 3995[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 3996Warnings: 3997Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 3998include/assert.inc [One warning/error should be generated.] 3999include/assert.inc [It should be a Warning, not an Error.] 4000include/assert.inc [Text should be "violates GTID consistency"] 4001include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4002include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4003ROLLBACK; 4004SET GTID_NEXT = 'AUTOMATIC'; 4005include/assert.inc [Both counters should be 0] 4006DROP TABLE IF EXISTS t1; 4007---- CREATE ... SELECT (InnoDB, 0 row) ---- 4008# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=ANONYMOUS 4009SET GTID_NEXT = 'ANONYMOUS'; 4010[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4011include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4012include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4013[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4014Warnings: 4015Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4016include/assert.inc [One warning/error should be generated.] 4017include/assert.inc [It should be a Warning, not an Error.] 4018include/assert.inc [Text should be "violates GTID consistency"] 4019include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4020include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4021ROLLBACK; 4022SET GTID_NEXT = 'AUTOMATIC'; 4023include/assert.inc [Both counters should be 0] 4024DROP TABLE IF EXISTS t1; 4025---- CREATE ... SELECT (MyISAM, 0 row) ---- 4026# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=ANONYMOUS 4027SET GTID_NEXT = 'ANONYMOUS'; 4028[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4029include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4030include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4031[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4032Warnings: 4033Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4034include/assert.inc [One warning/error should be generated.] 4035include/assert.inc [It should be a Warning, not an Error.] 4036include/assert.inc [Text should be "violates GTID consistency"] 4037include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4038include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4039ROLLBACK; 4040SET GTID_NEXT = 'AUTOMATIC'; 4041include/assert.inc [Both counters should be 0] 4042DROP TABLE IF EXISTS t1; 4043---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 4044# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=ANONYMOUS 4045SET GTID_NEXT = 'ANONYMOUS'; 4046BEGIN; INSERT INTO t0 VALUES (1);; 4047[START] CREATE TABLE t1 (a INT) SELECT 1; 4048include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4049include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4050[END] CREATE TABLE t1 (a INT) SELECT 1; 4051Warnings: 4052Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4053include/assert.inc [One warning/error should be generated.] 4054include/assert.inc [It should be a Warning, not an Error.] 4055include/assert.inc [Text should be "violates GTID consistency"] 4056include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4057include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4058ROLLBACK; 4059SET GTID_NEXT = 'AUTOMATIC'; 4060include/assert.inc [Both counters should be 0] 4061DROP TABLE IF EXISTS t1; 4062---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 4063# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=ANONYMOUS 4064SET GTID_NEXT = 'ANONYMOUS'; 4065BEGIN; INSERT INTO t0 VALUES (1);; 4066[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 4067include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4068include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4069[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 4070Warnings: 4071Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4072include/assert.inc [One warning/error should be generated.] 4073include/assert.inc [It should be a Warning, not an Error.] 4074include/assert.inc [Text should be "violates GTID consistency"] 4075include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4076include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4077ROLLBACK; 4078SET GTID_NEXT = 'AUTOMATIC'; 4079include/assert.inc [Both counters should be 0] 4080DROP TABLE IF EXISTS t1; 4081---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 4082# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=ANONYMOUS 4083SET GTID_NEXT = 'ANONYMOUS'; 4084BEGIN; INSERT INTO t0 VALUES (1);; 4085[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 4086include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4087include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4088[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 4089Warnings: 4090Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4091include/assert.inc [One warning/error should be generated.] 4092include/assert.inc [It should be a Warning, not an Error.] 4093include/assert.inc [Text should be "violates GTID consistency"] 4094include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4095include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4096ROLLBACK; 4097SET GTID_NEXT = 'AUTOMATIC'; 4098include/assert.inc [Both counters should be 0] 4099DROP TABLE IF EXISTS t1; 4100---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 4101# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=ANONYMOUS 4102SET GTID_NEXT = 'ANONYMOUS'; 4103BEGIN; INSERT INTO t0 VALUES (1);; 4104[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4105include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4106include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4107[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4108Warnings: 4109Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4110include/assert.inc [One warning/error should be generated.] 4111include/assert.inc [It should be a Warning, not an Error.] 4112include/assert.inc [Text should be "violates GTID consistency"] 4113include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4114include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4115ROLLBACK; 4116SET GTID_NEXT = 'AUTOMATIC'; 4117include/assert.inc [Both counters should be 0] 4118DROP TABLE IF EXISTS t1; 4119---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 4120# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=ANONYMOUS 4121SET GTID_NEXT = 'ANONYMOUS'; 4122BEGIN; INSERT INTO t0 VALUES (1);; 4123[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4124include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4125include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4126[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4127Warnings: 4128Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4129include/assert.inc [One warning/error should be generated.] 4130include/assert.inc [It should be a Warning, not an Error.] 4131include/assert.inc [Text should be "violates GTID consistency"] 4132include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4133include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4134ROLLBACK; 4135SET GTID_NEXT = 'AUTOMATIC'; 4136include/assert.inc [Both counters should be 0] 4137DROP TABLE IF EXISTS t1; 4138DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 4139######## ENFORCE_GTID_CONSISTENCY=WARN GTID_MODE=OFF_PERMISSIVE GTID_NEXT=GTID ######## 4140CREATE TABLE t0 (a INT) ENGINE = InnoDB; 4141CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 4142CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 4143CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 4144CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 4145INSERT INTO nonempty_innodb VALUES (1); 4146INSERT INTO nonempty_myisam VALUES (1); 4147---- CREATE ... SELECT (value, 1 row) ---- 4148# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=GTID 4149SET GTID_NEXT = 'GTID'; 4150error ER_GTID_UNSAFE_CREATE_SELECT 4151CREATE TABLE t1 (a INT) SELECT 1; 4152ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 4153include/assert.inc [One warning/error should be generated.] 4154include/assert.inc [It should be an Error, not a Warning.] 4155include/assert.inc [Text should be "violates GTID consistency"] 4156include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4157include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4158ROLLBACK; 4159SET GTID_NEXT = 'AUTOMATIC'; 4160include/assert.inc [Both counters should be 0] 4161DROP TABLE IF EXISTS t1; 4162Warnings: 4163Note 1051 Unknown table 'test.t1' 4164---- CREATE ... SELECT (InnoDB, 1 row) ---- 4165# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=GTID 4166SET GTID_NEXT = 'GTID'; 4167error ER_GTID_UNSAFE_CREATE_SELECT 4168CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 4169ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 4170include/assert.inc [One warning/error should be generated.] 4171include/assert.inc [It should be an Error, not a Warning.] 4172include/assert.inc [Text should be "violates GTID consistency"] 4173include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4174include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4175ROLLBACK; 4176SET GTID_NEXT = 'AUTOMATIC'; 4177include/assert.inc [Both counters should be 0] 4178DROP TABLE IF EXISTS t1; 4179Warnings: 4180Note 1051 Unknown table 'test.t1' 4181---- CREATE ... SELECT (MyISAM, 1 row) ---- 4182# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=GTID 4183SET GTID_NEXT = 'GTID'; 4184error ER_GTID_UNSAFE_CREATE_SELECT 4185CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 4186ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 4187include/assert.inc [One warning/error should be generated.] 4188include/assert.inc [It should be an Error, not a Warning.] 4189include/assert.inc [Text should be "violates GTID consistency"] 4190include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4191include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4192ROLLBACK; 4193SET GTID_NEXT = 'AUTOMATIC'; 4194include/assert.inc [Both counters should be 0] 4195DROP TABLE IF EXISTS t1; 4196Warnings: 4197Note 1051 Unknown table 'test.t1' 4198---- CREATE ... SELECT (InnoDB, 0 row) ---- 4199# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=GTID 4200SET GTID_NEXT = 'GTID'; 4201error ER_GTID_UNSAFE_CREATE_SELECT 4202CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4203ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 4204include/assert.inc [One warning/error should be generated.] 4205include/assert.inc [It should be an Error, not a Warning.] 4206include/assert.inc [Text should be "violates GTID consistency"] 4207include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4208include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4209ROLLBACK; 4210SET GTID_NEXT = 'AUTOMATIC'; 4211include/assert.inc [Both counters should be 0] 4212DROP TABLE IF EXISTS t1; 4213Warnings: 4214Note 1051 Unknown table 'test.t1' 4215---- CREATE ... SELECT (MyISAM, 0 row) ---- 4216# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=GTID 4217SET GTID_NEXT = 'GTID'; 4218error ER_GTID_UNSAFE_CREATE_SELECT 4219CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4220ERROR HY000: Statement violates GTID consistency: CREATE TABLE ... SELECT. 4221include/assert.inc [One warning/error should be generated.] 4222include/assert.inc [It should be an Error, not a Warning.] 4223include/assert.inc [Text should be "violates GTID consistency"] 4224include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4225include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4226ROLLBACK; 4227SET GTID_NEXT = 'AUTOMATIC'; 4228include/assert.inc [Both counters should be 0] 4229DROP TABLE IF EXISTS t1; 4230Warnings: 4231Note 1051 Unknown table 'test.t1' 4232---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 4233# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=GTID 4234SET GTID_NEXT = 'GTID'; 4235BEGIN; INSERT INTO t0 VALUES (1);; 4236error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 4237CREATE TABLE t1 (a INT) SELECT 1; 4238ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 4239include/assert.inc [One warning/error should be generated.] 4240include/assert.inc [It should be an Error, not a Warning.] 4241include/assert.inc [Text should be "violates GTID consistency"] 4242include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4243include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4244ROLLBACK; 4245SET GTID_NEXT = 'AUTOMATIC'; 4246include/assert.inc [Both counters should be 0] 4247DROP TABLE IF EXISTS t1; 4248Warnings: 4249Note 1051 Unknown table 'test.t1' 4250---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 4251# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=GTID 4252SET GTID_NEXT = 'GTID'; 4253BEGIN; INSERT INTO t0 VALUES (1);; 4254error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 4255CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 4256ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 4257include/assert.inc [One warning/error should be generated.] 4258include/assert.inc [It should be an Error, not a Warning.] 4259include/assert.inc [Text should be "violates GTID consistency"] 4260include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4261include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4262ROLLBACK; 4263SET GTID_NEXT = 'AUTOMATIC'; 4264include/assert.inc [Both counters should be 0] 4265DROP TABLE IF EXISTS t1; 4266Warnings: 4267Note 1051 Unknown table 'test.t1' 4268---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 4269# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=GTID 4270SET GTID_NEXT = 'GTID'; 4271BEGIN; INSERT INTO t0 VALUES (1);; 4272error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 4273CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 4274ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 4275include/assert.inc [One warning/error should be generated.] 4276include/assert.inc [It should be an Error, not a Warning.] 4277include/assert.inc [Text should be "violates GTID consistency"] 4278include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4279include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4280ROLLBACK; 4281SET GTID_NEXT = 'AUTOMATIC'; 4282include/assert.inc [Both counters should be 0] 4283DROP TABLE IF EXISTS t1; 4284Warnings: 4285Note 1051 Unknown table 'test.t1' 4286---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 4287# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=GTID 4288SET GTID_NEXT = 'GTID'; 4289BEGIN; INSERT INTO t0 VALUES (1);; 4290error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 4291CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4292ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 4293include/assert.inc [One warning/error should be generated.] 4294include/assert.inc [It should be an Error, not a Warning.] 4295include/assert.inc [Text should be "violates GTID consistency"] 4296include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4297include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4298ROLLBACK; 4299SET GTID_NEXT = 'AUTOMATIC'; 4300include/assert.inc [Both counters should be 0] 4301DROP TABLE IF EXISTS t1; 4302Warnings: 4303Note 1051 Unknown table 'test.t1' 4304---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 4305# enforce_gtid_consistency=2 gtid_mode=1 gtid_next=GTID 4306SET GTID_NEXT = 'GTID'; 4307BEGIN; INSERT INTO t0 VALUES (1);; 4308error ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 4309CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4310ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT == 'UUID:NUMBER'. 4311include/assert.inc [One warning/error should be generated.] 4312include/assert.inc [It should be an Error, not a Warning.] 4313include/assert.inc [Text should be "violates GTID consistency"] 4314include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4315include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4316ROLLBACK; 4317SET GTID_NEXT = 'AUTOMATIC'; 4318include/assert.inc [Both counters should be 0] 4319DROP TABLE IF EXISTS t1; 4320Warnings: 4321Note 1051 Unknown table 'test.t1' 4322DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 4323SET GLOBAL GTID_MODE = 0; 4324######## ENFORCE_GTID_CONSISTENCY=WARN GTID_MODE=OFF GTID_NEXT=AUTOMATIC ######## 4325CREATE TABLE t0 (a INT) ENGINE = InnoDB; 4326CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 4327CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 4328CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 4329CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 4330INSERT INTO nonempty_innodb VALUES (1); 4331INSERT INTO nonempty_myisam VALUES (1); 4332---- CREATE ... SELECT (value, 1 row) ---- 4333# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=AUTOMATIC 4334SET GTID_NEXT = 'AUTOMATIC'; 4335[START] CREATE TABLE t1 (a INT) SELECT 1; 4336include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4337include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4338[END] CREATE TABLE t1 (a INT) SELECT 1; 4339Warnings: 4340Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4341include/assert.inc [One warning/error should be generated.] 4342include/assert.inc [It should be a Warning, not an Error.] 4343include/assert.inc [Text should be "violates GTID consistency"] 4344include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4345include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4346ROLLBACK; 4347SET GTID_NEXT = 'AUTOMATIC'; 4348include/assert.inc [Both counters should be 0] 4349DROP TABLE IF EXISTS t1; 4350---- CREATE ... SELECT (InnoDB, 1 row) ---- 4351# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=AUTOMATIC 4352SET GTID_NEXT = 'AUTOMATIC'; 4353[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 4354include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4355include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4356[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 4357Warnings: 4358Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4359include/assert.inc [One warning/error should be generated.] 4360include/assert.inc [It should be a Warning, not an Error.] 4361include/assert.inc [Text should be "violates GTID consistency"] 4362include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4363include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4364ROLLBACK; 4365SET GTID_NEXT = 'AUTOMATIC'; 4366include/assert.inc [Both counters should be 0] 4367DROP TABLE IF EXISTS t1; 4368---- CREATE ... SELECT (MyISAM, 1 row) ---- 4369# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=AUTOMATIC 4370SET GTID_NEXT = 'AUTOMATIC'; 4371[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 4372include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4373include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4374[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 4375Warnings: 4376Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4377include/assert.inc [One warning/error should be generated.] 4378include/assert.inc [It should be a Warning, not an Error.] 4379include/assert.inc [Text should be "violates GTID consistency"] 4380include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4381include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4382ROLLBACK; 4383SET GTID_NEXT = 'AUTOMATIC'; 4384include/assert.inc [Both counters should be 0] 4385DROP TABLE IF EXISTS t1; 4386---- CREATE ... SELECT (InnoDB, 0 row) ---- 4387# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=AUTOMATIC 4388SET GTID_NEXT = 'AUTOMATIC'; 4389[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4390include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4391include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4392[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4393Warnings: 4394Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4395include/assert.inc [One warning/error should be generated.] 4396include/assert.inc [It should be a Warning, not an Error.] 4397include/assert.inc [Text should be "violates GTID consistency"] 4398include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4399include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4400ROLLBACK; 4401SET GTID_NEXT = 'AUTOMATIC'; 4402include/assert.inc [Both counters should be 0] 4403DROP TABLE IF EXISTS t1; 4404---- CREATE ... SELECT (MyISAM, 0 row) ---- 4405# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=AUTOMATIC 4406SET GTID_NEXT = 'AUTOMATIC'; 4407[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4408include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4409include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4410[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4411Warnings: 4412Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4413include/assert.inc [One warning/error should be generated.] 4414include/assert.inc [It should be a Warning, not an Error.] 4415include/assert.inc [Text should be "violates GTID consistency"] 4416include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4417include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4418ROLLBACK; 4419SET GTID_NEXT = 'AUTOMATIC'; 4420include/assert.inc [Both counters should be 0] 4421DROP TABLE IF EXISTS t1; 4422---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 4423# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=AUTOMATIC 4424SET GTID_NEXT = 'AUTOMATIC'; 4425BEGIN; INSERT INTO t0 VALUES (1);; 4426[START] CREATE TABLE t1 (a INT) SELECT 1; 4427include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4428include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4429[END] CREATE TABLE t1 (a INT) SELECT 1; 4430Warnings: 4431Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4432include/assert.inc [One warning/error should be generated.] 4433include/assert.inc [It should be a Warning, not an Error.] 4434include/assert.inc [Text should be "violates GTID consistency"] 4435include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4436include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4437ROLLBACK; 4438SET GTID_NEXT = 'AUTOMATIC'; 4439include/assert.inc [Both counters should be 0] 4440DROP TABLE IF EXISTS t1; 4441---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 4442# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=AUTOMATIC 4443SET GTID_NEXT = 'AUTOMATIC'; 4444BEGIN; INSERT INTO t0 VALUES (1);; 4445[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 4446include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4447include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4448[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 4449Warnings: 4450Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4451include/assert.inc [One warning/error should be generated.] 4452include/assert.inc [It should be a Warning, not an Error.] 4453include/assert.inc [Text should be "violates GTID consistency"] 4454include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4455include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4456ROLLBACK; 4457SET GTID_NEXT = 'AUTOMATIC'; 4458include/assert.inc [Both counters should be 0] 4459DROP TABLE IF EXISTS t1; 4460---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 4461# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=AUTOMATIC 4462SET GTID_NEXT = 'AUTOMATIC'; 4463BEGIN; INSERT INTO t0 VALUES (1);; 4464[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 4465include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4466include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4467[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 4468Warnings: 4469Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4470include/assert.inc [One warning/error should be generated.] 4471include/assert.inc [It should be a Warning, not an Error.] 4472include/assert.inc [Text should be "violates GTID consistency"] 4473include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4474include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4475ROLLBACK; 4476SET GTID_NEXT = 'AUTOMATIC'; 4477include/assert.inc [Both counters should be 0] 4478DROP TABLE IF EXISTS t1; 4479---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 4480# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=AUTOMATIC 4481SET GTID_NEXT = 'AUTOMATIC'; 4482BEGIN; INSERT INTO t0 VALUES (1);; 4483[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4484include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4485include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4486[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4487Warnings: 4488Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4489include/assert.inc [One warning/error should be generated.] 4490include/assert.inc [It should be a Warning, not an Error.] 4491include/assert.inc [Text should be "violates GTID consistency"] 4492include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4493include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4494ROLLBACK; 4495SET GTID_NEXT = 'AUTOMATIC'; 4496include/assert.inc [Both counters should be 0] 4497DROP TABLE IF EXISTS t1; 4498---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 4499# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=AUTOMATIC 4500SET GTID_NEXT = 'AUTOMATIC'; 4501BEGIN; INSERT INTO t0 VALUES (1);; 4502[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4503include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4504include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4505[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4506Warnings: 4507Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4508include/assert.inc [One warning/error should be generated.] 4509include/assert.inc [It should be a Warning, not an Error.] 4510include/assert.inc [Text should be "violates GTID consistency"] 4511include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4512include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4513ROLLBACK; 4514SET GTID_NEXT = 'AUTOMATIC'; 4515include/assert.inc [Both counters should be 0] 4516DROP TABLE IF EXISTS t1; 4517DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 4518######## ENFORCE_GTID_CONSISTENCY=WARN GTID_MODE=OFF GTID_NEXT=ANONYMOUS ######## 4519CREATE TABLE t0 (a INT) ENGINE = InnoDB; 4520CREATE TABLE empty_innodb (a INT) ENGINE = InnoDB; 4521CREATE TABLE empty_myisam (a INT) ENGINE = MyISAM; 4522CREATE TABLE nonempty_innodb (a INT) ENGINE = InnoDB; 4523CREATE TABLE nonempty_myisam (a INT) ENGINE = MyISAM; 4524INSERT INTO nonempty_innodb VALUES (1); 4525INSERT INTO nonempty_myisam VALUES (1); 4526---- CREATE ... SELECT (value, 1 row) ---- 4527# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=ANONYMOUS 4528SET GTID_NEXT = 'ANONYMOUS'; 4529[START] CREATE TABLE t1 (a INT) SELECT 1; 4530include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4531include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4532[END] CREATE TABLE t1 (a INT) SELECT 1; 4533Warnings: 4534Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4535include/assert.inc [One warning/error should be generated.] 4536include/assert.inc [It should be a Warning, not an Error.] 4537include/assert.inc [Text should be "violates GTID consistency"] 4538include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4539include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4540ROLLBACK; 4541SET GTID_NEXT = 'AUTOMATIC'; 4542include/assert.inc [Both counters should be 0] 4543DROP TABLE IF EXISTS t1; 4544---- CREATE ... SELECT (InnoDB, 1 row) ---- 4545# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=ANONYMOUS 4546SET GTID_NEXT = 'ANONYMOUS'; 4547[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 4548include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4549include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4550[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 4551Warnings: 4552Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4553include/assert.inc [One warning/error should be generated.] 4554include/assert.inc [It should be a Warning, not an Error.] 4555include/assert.inc [Text should be "violates GTID consistency"] 4556include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4557include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4558ROLLBACK; 4559SET GTID_NEXT = 'AUTOMATIC'; 4560include/assert.inc [Both counters should be 0] 4561DROP TABLE IF EXISTS t1; 4562---- CREATE ... SELECT (MyISAM, 1 row) ---- 4563# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=ANONYMOUS 4564SET GTID_NEXT = 'ANONYMOUS'; 4565[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 4566include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4567include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4568[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 4569Warnings: 4570Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4571include/assert.inc [One warning/error should be generated.] 4572include/assert.inc [It should be a Warning, not an Error.] 4573include/assert.inc [Text should be "violates GTID consistency"] 4574include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4575include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4576ROLLBACK; 4577SET GTID_NEXT = 'AUTOMATIC'; 4578include/assert.inc [Both counters should be 0] 4579DROP TABLE IF EXISTS t1; 4580---- CREATE ... SELECT (InnoDB, 0 row) ---- 4581# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=ANONYMOUS 4582SET GTID_NEXT = 'ANONYMOUS'; 4583[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4584include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4585include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4586[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4587Warnings: 4588Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4589include/assert.inc [One warning/error should be generated.] 4590include/assert.inc [It should be a Warning, not an Error.] 4591include/assert.inc [Text should be "violates GTID consistency"] 4592include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4593include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4594ROLLBACK; 4595SET GTID_NEXT = 'AUTOMATIC'; 4596include/assert.inc [Both counters should be 0] 4597DROP TABLE IF EXISTS t1; 4598---- CREATE ... SELECT (MyISAM, 0 row) ---- 4599# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=ANONYMOUS 4600SET GTID_NEXT = 'ANONYMOUS'; 4601[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4602include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4603include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4604[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4605Warnings: 4606Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4607include/assert.inc [One warning/error should be generated.] 4608include/assert.inc [It should be a Warning, not an Error.] 4609include/assert.inc [Text should be "violates GTID consistency"] 4610include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4611include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4612ROLLBACK; 4613SET GTID_NEXT = 'AUTOMATIC'; 4614include/assert.inc [Both counters should be 0] 4615DROP TABLE IF EXISTS t1; 4616---- CREATE ... SELECT (value, 1 row, ongoing trx) ---- 4617# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=ANONYMOUS 4618SET GTID_NEXT = 'ANONYMOUS'; 4619BEGIN; INSERT INTO t0 VALUES (1);; 4620[START] CREATE TABLE t1 (a INT) SELECT 1; 4621include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4622include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4623[END] CREATE TABLE t1 (a INT) SELECT 1; 4624Warnings: 4625Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4626include/assert.inc [One warning/error should be generated.] 4627include/assert.inc [It should be a Warning, not an Error.] 4628include/assert.inc [Text should be "violates GTID consistency"] 4629include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4630include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4631ROLLBACK; 4632SET GTID_NEXT = 'AUTOMATIC'; 4633include/assert.inc [Both counters should be 0] 4634DROP TABLE IF EXISTS t1; 4635---- CREATE ... SELECT (InnoDB, 1 row, ongoing trx) ---- 4636# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=ANONYMOUS 4637SET GTID_NEXT = 'ANONYMOUS'; 4638BEGIN; INSERT INTO t0 VALUES (1);; 4639[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 4640include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4641include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4642[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_innodb; 4643Warnings: 4644Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4645include/assert.inc [One warning/error should be generated.] 4646include/assert.inc [It should be a Warning, not an Error.] 4647include/assert.inc [Text should be "violates GTID consistency"] 4648include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4649include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4650ROLLBACK; 4651SET GTID_NEXT = 'AUTOMATIC'; 4652include/assert.inc [Both counters should be 0] 4653DROP TABLE IF EXISTS t1; 4654---- CREATE ... SELECT (MyISAM, 1 row, ongoing trx) ---- 4655# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=ANONYMOUS 4656SET GTID_NEXT = 'ANONYMOUS'; 4657BEGIN; INSERT INTO t0 VALUES (1);; 4658[START] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 4659include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4660include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4661[END] CREATE TABLE t1 (a INT) SELECT * FROM nonempty_myisam; 4662Warnings: 4663Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4664include/assert.inc [One warning/error should be generated.] 4665include/assert.inc [It should be a Warning, not an Error.] 4666include/assert.inc [Text should be "violates GTID consistency"] 4667include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4668include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4669ROLLBACK; 4670SET GTID_NEXT = 'AUTOMATIC'; 4671include/assert.inc [Both counters should be 0] 4672DROP TABLE IF EXISTS t1; 4673---- CREATE ... SELECT (InnoDB, 0 row, ongoing trx) ---- 4674# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=ANONYMOUS 4675SET GTID_NEXT = 'ANONYMOUS'; 4676BEGIN; INSERT INTO t0 VALUES (1);; 4677[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4678include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4679include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4680[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_innodb; 4681Warnings: 4682Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4683include/assert.inc [One warning/error should be generated.] 4684include/assert.inc [It should be a Warning, not an Error.] 4685include/assert.inc [Text should be "violates GTID consistency"] 4686include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4687include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4688ROLLBACK; 4689SET GTID_NEXT = 'AUTOMATIC'; 4690include/assert.inc [Both counters should be 0] 4691DROP TABLE IF EXISTS t1; 4692---- CREATE ... SELECT (MyISAM, 0 row, ongoing trx) ---- 4693# enforce_gtid_consistency=2 gtid_mode=0 gtid_next=ANONYMOUS 4694SET GTID_NEXT = 'ANONYMOUS'; 4695BEGIN; INSERT INTO t0 VALUES (1);; 4696[START] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4697include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4698include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 1] 4699[END] CREATE TABLE t1 (a INT) SELECT * FROM empty_myisam; 4700Warnings: 4701Warning 1786 Statement violates GTID consistency: CREATE TABLE ... SELECT. 4702include/assert.inc [One warning/error should be generated.] 4703include/assert.inc [It should be a Warning, not an Error.] 4704include/assert.inc [Text should be "violates GTID consistency"] 4705include/assert.inc [ONGOING_AUTOMATIC_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4706include/assert.inc [ONGOING_ANONYMOUS_GTID_VIOLATING_TRANSACTION_COUNT should be 0] 4707ROLLBACK; 4708SET GTID_NEXT = 'AUTOMATIC'; 4709include/assert.inc [Both counters should be 0] 4710DROP TABLE IF EXISTS t1; 4711DROP TABLE empty_myisam, empty_innodb, nonempty_myisam, nonempty_innodb, t0; 4712SET GLOBAL ENFORCE_GTID_CONSISTENCY = OFF; 4713SET GLOBAL SQL_NOTES = @old_sql_notes; 4714include/rpl_end.inc 4715include/end_replace_gtid_combination.inc [gtid_mode=off/on -> default_storage_engine=InnoDB/MyISAM] 4716