| 1 |
--source include/have_binlog_format_mixed.inc |
| 2 |
--source include/have_debug.inc |
| 3 |
|
| 4 |
# BUG#19667258: WL#6972 - SERVER CRASH ON SET SESSION SESSION_TRACK_GTIDS='OFF' |
| 5 |
|
| 6 |
# This test file is configured to start the server with: |
| 7 |
# |
| 8 |
# --session_track_gtids='ALL_GTIDS' |
| 9 |
# |
| 10 |
# Then we are looking to assert the following: |
| 11 |
# - Verify that the following statements include |
| 12 |
# GTID data in the OK packet immediately after start |
| 13 |
# the server starts up. |
| 14 |
# - Verify that every transition includes the expected |
| 15 |
# GTID data in the OK packet. |
| 16 |
|
| 17 |
--enable_session_track_info |
| 18 |
|
| 19 |
--echo # ALL_GTIDS at startup: this must return GTID:1 |
| 20 |
CREATE TABLE t1 (c1 INT) Engine=InnoDB; |
| 21 |
|
| 22 |
--echo # ALL_GTIDS at startup: this must return GTID:1-2 |
| 23 |
DROP TABLE t1; |
| 24 |
|
| 25 |
--disable_session_track_info |
| 26 |
|
| 27 |
--let $i=3 |
| 28 |
while($i) |
| 29 |
{ |
| 30 |
if ($i==3) |
| 31 |
{ |
| 32 |
--let $from=ALL_GTIDS |
| 33 |
} |
| 34 |
|
| 35 |
if ($i==2) |
| 36 |
{ |
| 37 |
--let $from=OWN_GTID |
| 38 |
} |
| 39 |
|
| 40 |
if ($i==1) |
| 41 |
{ |
| 42 |
--let $from=OFF |
| 43 |
} |
| 44 |
|
| 45 |
--let $text= this must return '' |
| 46 |
if (`SELECT '$from' = 'ALL_GTIDS'`) |
| 47 |
{ |
| 48 |
--let $text= this must return GTID:1-2 |
| 49 |
} |
| 50 |
|
| 51 |
--echo ## $from -> ALL_GTIDS : $text ## |
| 52 |
--eval SET SESSION session_track_gtids='$from' |
| 53 |
--enable_session_track_info |
| 54 |
SET SESSION session_track_gtids='ALL_GTIDS'; |
| 55 |
--disable_session_track_info |
| 56 |
|
| 57 |
--echo ## $from -> OWN_GTID: $text ## |
| 58 |
--eval SET SESSION session_track_gtids='$from' |
| 59 |
--enable_session_track_info |
| 60 |
SET SESSION session_track_gtids='OWN_GTID'; |
| 61 |
--disable_session_track_info |
| 62 |
|
| 63 |
--echo ## $from -> OFF : $text ## |
| 64 |
--eval SET SESSION session_track_gtids='$from' |
| 65 |
--enable_session_track_info |
| 66 |
SET SESSION session_track_gtids='OFF'; |
| 67 |
--disable_session_track_info |
| 68 |
|
| 69 |
--dec $i |
| 70 |
} |
| 71 |
|
| 72 |
RESET MASTER; |