| 1 |
# |
| 2 |
# 1) Prepare a sample table and insert values. |
| 3 |
# |
| 4 |
CREATE TABLE t1(f1 LONGTEXT); |
| 5 |
INSERT INTO t1 VALUES (REPEAT('a', 1073741824/2)); |
| 6 |
# |
| 7 |
# 2) Prepare a similar table like before created. |
| 8 |
# |
| 9 |
CREATE TABLE t2 LIKE t1; |
| 10 |
# |
| 11 |
# 3) Flushing logs to start a new fresh log. |
| 12 |
# |
| 13 |
FLUSH LOGS; |
| 14 |
# |
| 15 |
# 4) Get the filename of the binary log. |
| 16 |
# |
| 17 |
include/save_binlog_position.inc |
| 18 |
# |
| 19 |
# 5) Run a query to get events in mysqlbinlog greater than 4GB. |
| 20 |
# |
| 21 |
INSERT INTO t2 SELECT f1 FROM t1 UNION ALL SELECT f1 FROM t1 UNION ALL SELECT |
| 22 |
f1 FROM t1 UNION ALL SELECT f1 FROM t1 UNION ALL SELECT f1 FROM t1 UNION ALL |
| 23 |
SELECT f1 FROM t1 UNION ALL SELECT f1 FROM t1 UNION ALL SELECT f1 FROM t1; |
| 24 |
# |
| 25 |
# 6) Get the start position of the 14'th event. |
| 26 |
# |
| 27 |
# |
| 28 |
# 7)Verify that the position is actually bigger than 4 GiB. |
| 29 |
# |
| 30 |
include/assert.inc [The position of the 14th event should be bigger than 4 GiB] |
| 31 |
# |
| 32 |
# 8)Run mysqlbinlog, find only the lines beginning with '# at', |
| 33 |
# select the last of those lines,select only the number from that line, |
| 34 |
# and write that to the file. |
| 35 |
# |
| 36 |
include/read_file_to_var.inc |
| 37 |
include/assert.inc [The position should be greater than 4 GiB] |
| 38 |
# |
| 39 |
# 9)Checking the error message that will be generated when it is connected to remote. |
| 40 |
# |
| 41 |
ERROR: The option --start-position cannot be used with values greater than 4 GiB (4294967854), when one of read-from-remote-server or read-from-remote-source is used. |
| 42 |
# |
| 43 |
# 10) Cleanup. |
| 44 |
# |
| 45 |
DROP TABLE t2; |
| 46 |
DROP TABLE t1; |