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
21RESET MASTER;
22CREATE TABLE t(f text);
23INSERT INTO t VALUES (repeat('x',4096));
24INSERT INTO t SELECT * FROM t;
25INSERT INTO t SELECT * FROM t;
26INSERT INTO t SELECT * FROM t;
27INSERT INTO t SELECT * FROM t;
28INSERT INTO t SELECT * FROM t;
29INSERT INTO t SELECT * FROM t;
30INSERT INTO t SELECT * FROM t;
31INSERT INTO t SELECT * FROM t;
32INSERT INTO t SELECT * FROM t;
33SELECT COUNT(*) FROM t;
34FLUSH LOGS;
35let $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#
41DROP 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
50DROP TABLE t;
51RESET MASTER;
52