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

« back to all changes in this revision

Viewing changes to mysql-test/t/crash_commit_before.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
-- source include/not_embedded.inc
 
2
# Don't test this under valgrind, memory leaks will occur
 
3
--source include/not_valgrind.inc
 
4
 
 
5
# Binary must be compiled with debug for crash to occur
 
6
--source include/have_debug.inc
 
7
 
 
8
--source include/have_innodb.inc
 
9
 
 
10
CREATE TABLE t1(a int) engine=innodb;
 
11
START TRANSACTION;
 
12
insert into t1 values(9);
 
13
 
 
14
# Setup the mysqld to crash at certain point
 
15
SET SESSION debug="d,crash_commit_before";
 
16
 
 
17
# Write file to make mysql-test-run.pl expect crash and restart
 
18
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
 
19
 
 
20
# Run the crashing query
 
21
--error 2013
 
22
COMMIT;
 
23
 
 
24
# Turn on reconnect
 
25
--enable_reconnect
 
26
 
 
27
# Call script that will poll the server waiting for it to be back online again
 
28
--source include/wait_until_connected_again.inc
 
29
 
 
30
SHOW CREATE TABLE t1;
 
31
 
 
32
SELECT * FROM t1;
 
33
 
 
34
 
 
35
DROP TABLE t1;