~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/binlog/t/binlog_incident.test

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# The purpose of this test is to provide a reference for how the
 
2
# incident log event is represented in the output from the mysqlbinlog
 
3
# program.
 
4
 
 
5
source include/have_log_bin.inc;
 
6
source include/have_debug.inc;
 
7
 
 
8
let $MYSQLD_DATADIR= `select @@datadir`;
 
9
RESET MASTER;
 
10
 
 
11
CREATE TABLE t1 (a INT);
 
12
 
 
13
INSERT INTO t1 VALUES (1),(2),(3);
 
14
SELECT * FROM t1;
 
15
 
 
16
# This will generate an incident log event and store it in the binary
 
17
# log before the replace statement.
 
18
REPLACE INTO t1 VALUES (4);
 
19
 
 
20
DROP TABLE t1;
 
21
FLUSH LOGS;
 
22
 
 
23
exec $MYSQL_BINLOG --start-position=106 $MYSQLD_DATADIR/master-bin.000001 >$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql;
 
24
--disable_query_log
 
25
eval SELECT cont LIKE '%RELOAD DATABASE; # Shall generate syntax error%' AS `Contain RELOAD DATABASE` FROM (SELECT load_file('$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql') AS cont) AS tbl;
 
26
--enable_query_log
 
27
 
 
28
remove_file $MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql;