1###################### percona_bug933969.test ########################
2# Bug #933969: mysqlbinlog doesn't accept stdin                      #
3#                                                                    #
4# The goal of this testcase is to test that mysqlbinlog handle       #
5# stdin correctly when stdin is pipe.                                #
6# i.e. "cat log | mysqlbinlog -" don't cause mysqlbinlog failure     #
7######################################################################
8-- source include/have_log_bin.inc
9-- source include/not_windows.inc
10-- source include/not_embedded.inc
11
12# deletes all the binary logs
13RESET MASTER;
14
15--disable_warnings
16DROP TABLE IF EXISTS t1;
17--enable_warnings
18
19# produce some statements for binlog
20
21CREATE TABLE t1 (word VARCHAR(20));
22
23INSERT INTO t1 VALUES ("hamite");
24INSERT INTO t1 VALUES ("hoho");
25INSERT INTO t1 VALUES ("znamenito");
26INSERT INTO t1 VALUES ("mrachny");
27INSERT INTO t1 VALUES ("mrak");
28INSERT INTO t1 VALUES ("zhut");
29INSERT INTO t1 VALUES ("parnisha");
30INSERT INTO t1 VALUES ("krrasota!");
31INSERT INTO t1 VALUES ("podumayesh");
32INSERT INTO t1 VALUES ("ogo!");
33
34FLUSH LOGS;
35
36# run mysqlbinlog and make sure it ends normally
37
38let $MYSQLD_DATADIR= `SELECT @@datadir`;
39--exec cat $MYSQLD_DATADIR/master-bin.000001 | $MYSQL_BINLOG - >/dev/null
40
41DROP TABLE t1;
42RESET MASTER;
43