1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00
Files
mariadb/mysql-test/suite/binlog/t/binlog_mysqlbinlog_suppress_O_TMPFILE.test
2025-04-29 13:53:16 +10:00

52 lines
1.5 KiB
Plaintext

# ==== Purpose ====
#
# Suppress the following informational note that gets printed to standard
# error when O_TMPFILE flag is not supported by underlying operating system.
#
# Note: ../client/mysqlbinlog: O_TMPFILE is not supported on /tmp (disabling
# future attempts)
#
# Step 1: Generate a binarylog file with a size greater than 1MB.
# Step 2: Use mysqlbinlog tool to generate sql file and redirect the standard
# error to standard output (2>&1)
# Step 3: Source the generated sql file as input to mysql client, observe no
# syntax error is reported.
#
# ==== References ====
#
# MDEV-23846: O_TMPFILE error in mysqlbinlog stream output breaks restore
#
--source include/have_binlog_format_row.inc
RESET MASTER;
CREATE TABLE t(f text);
INSERT INTO t VALUES (repeat('x',4096));
INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
INSERT INTO t SELECT * FROM t;
SELECT COUNT(*) FROM t;
FLUSH LOGS;
let $MYSQLD_DATADIR= `select @@datadir`;
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql 2>&1
#
# Clear database and restore from binlog
#
DROP TABLE t;
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
--echo # 512- Rows must be present
--let $assert_cond= COUNT(*) = 512 FROM t
--let $assert_text= Table t should have 512 rows.
--source include/assert.inc
DROP TABLE t;
RESET MASTER;