| 1 |
# ==== Purpose ==== |
| 2 |
# |
| 3 |
# Verify that SHOW BINLOG EVENTS FROM <invalid starting offset> shows correct |
| 4 |
# starting offset of an event after the invalid starting offset. |
| 5 |
# |
| 6 |
# ==== Implementation ==== |
| 7 |
# |
| 8 |
# 1. Execute SHOW BINLOG EVENTS FROM <invalid starting offset>. |
| 9 |
# 2. Verify that it shows correct starting offset of an event |
| 10 |
# after the invalid starting offset. |
| 11 |
# 3. Execute SHOW BINLOG EVENTS FROM <valid starting offset>. |
| 12 |
# 4. Verify that it shows correct starting offset of an event |
| 13 |
# at the valid starting offset. |
| 14 |
# |
| 15 |
# ==== References ==== |
| 16 |
# |
| 17 |
# Bug #29039732 SHOW BINLOG EVENTS FROM <BAD OFFSET> IS NOT DIAGNOSED |
| 18 |
|
| 19 |
# This test script will be run only in non GR set up. |
| 20 |
--source include/not_group_replication_plugin.inc |
| 21 |
# Test in this file is binlog format agnostic, thus no need |
| 22 |
# to rerun it for every format. |
| 23 |
--source include/have_binlog_format_row.inc |
| 24 |
--source include/have_log_bin.inc |
| 25 |
|
| 26 |
CREATE TABLE t1 (c1 INT); |
| 27 |
|
| 28 |
--let $assert_text=Verify that the starting offset (4) of an event after the invalid position 1 is displayed. |
| 29 |
--let $assert_cond="[SHOW BINLOG EVENTS FROM 1 LIMIT 1, Pos, 1]" = 4 |
| 30 |
--source include/assert.inc |
| 31 |
|
| 32 |
--let $assert_text=Verify that the starting offset (4) of an event at the valid position 4 is displayed. |
| 33 |
--let $assert_cond="[SHOW BINLOG EVENTS FROM 4 LIMIT 1, Pos, 1]" = 4 |
| 34 |
--source include/assert.inc |
| 35 |
|
| 36 |
--let $assert_text=Verify that the starting offset (126) of an event after the invalid position 14 is displayed. |
| 37 |
--let $assert_cond="[SHOW BINLOG EVENTS FROM 14 LIMIT 1, Pos, 1]" = 126 |
| 38 |
--source include/assert.inc |
| 39 |
|
| 40 |
--let $assert_text=Verify that the starting offset (157) of an event after the invalid position 127 is displayed. |
| 41 |
--let $assert_cond="[SHOW BINLOG EVENTS FROM 127 LIMIT 1, Pos, 1]" = 157 |
| 42 |
--source include/assert.inc |
| 43 |
|
| 44 |
--let $assert_text=Verify that the starting offset (157) of an event at the valid position 157 is displayed. |
| 45 |
--let $assert_cond="[SHOW BINLOG EVENTS FROM 157 LIMIT 1, Pos, 1]" = 157 |
| 46 |
--source include/assert.inc |
| 47 |
|
| 48 |
DROP TABLE t1; |