File: binlog_mysqlbinlog_4g_start_position.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (46 lines) | stat: -rw-r--r-- 1,412 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
# 1) Prepare a sample table and insert values.
#
CREATE TABLE t1(f1 LONGTEXT);
INSERT INTO t1 VALUES (REPEAT('a', 1073741824/2));
#
# 2) Prepare a similar table like before created.
#
CREATE TABLE t2 LIKE t1;
#
# 3) Flushing logs to start a new fresh log.
#
FLUSH LOGS;
#
# 4) Get the filename of the binary log.
#
include/save_binlog_position.inc
#
# 5) Run a query to get events in mysqlbinlog greater than 4GB.
#
INSERT INTO t2 SELECT f1 FROM t1 UNION ALL SELECT f1 FROM t1 UNION ALL SELECT
f1 FROM t1 UNION ALL SELECT f1 FROM t1 UNION ALL SELECT f1 FROM t1 UNION ALL
SELECT f1 FROM t1 UNION ALL SELECT f1 FROM t1 UNION ALL SELECT f1 FROM t1;
#
# 6) Get the start position of the 14'th event.
#
#
# 7)Verify that the position is actually bigger than 4 GiB.
#
include/assert.inc [The position of the 14th event should be bigger than 4 GiB]
#
# 8)Run mysqlbinlog, find only the lines beginning with '# at',
# select the last of those lines,select only the number from that line,
# and write that to the file.
#
include/read_file_to_var.inc
include/assert.inc [The position should be greater than 4 GiB]
#
# 9)Checking the error message that will be generated when it is connected to remote.
#
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.
#
# 10) Cleanup.
#
DROP TABLE t2;
DROP TABLE t1;