Debian Codegraph @

mysql-test/suite/binlog/t/binlog_mysqlbinlog_suppress_O_TMPFILE.test

raw
1 # ==== Purpose ====
2 #
3 # Suppress the following informational note that gets printed to standard
4 # error when O_TMPFILE flag is not supported by underlying operating system.
5 #
6 # Note: ../client/mysqlbinlog: O_TMPFILE is not supported on /tmp (disabling
7 # future attempts)
8 #
9 # Step 1: Generate a binarylog file with a size greater than 1MB.
10 # Step 2: Use mysqlbinlog tool to generate sql file and redirect the standard
11 # error to standard output (2>&1)
12 # Step 3: Source the generated sql file as inpurt to mysql client, observe no
13 # syntax error is reported.
14 #
15 # ==== References ====
16 #
17 # MDEV-23846: O_TMPFILE error in mysqlbinlog stream output breaks restore
18 #
19 --source include/have_binlog_format_row.inc
20
21 RESET MASTER;
22 CREATE TABLE t(f text);
23 INSERT INTO t VALUES (repeat('x',4096));
24 INSERT INTO t SELECT * FROM t;
25 INSERT INTO t SELECT * FROM t;
26 INSERT INTO t SELECT * FROM t;
27 INSERT INTO t SELECT * FROM t;
28 INSERT INTO t SELECT * FROM t;
29 INSERT INTO t SELECT * FROM t;
30 INSERT INTO t SELECT * FROM t;
31 INSERT INTO t SELECT * FROM t;
32 INSERT INTO t SELECT * FROM t;
33 SELECT COUNT(*) FROM t;
34 FLUSH LOGS;
35 let $MYSQLD_DATADIR= `select @@datadir`;
36
37 --exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql 2>&1
38 #
39 # Clear database and restore from binlog
40 #
41 DROP TABLE t;
42
43 --exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
44
45 --echo # 512- Rows must be present
46 --let $assert_cond= COUNT(*) = 512 FROM t
47 --let $assert_text= Table t should have 512 rows.
48 --source include/assert.inc
49
50 DROP TABLE t;
51 RESET MASTER;