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

« back to all changes in this revision

Viewing changes to mysql-test/r/myisam_debug.result

  • 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
#
 
2
# BUG#40827 - Killing insert-select to MyISAM can cause table corruption
 
3
#
 
4
CREATE TABLE `t1` (
 
5
`id` BIGINT(20) ,
 
6
`id1` BIGINT(20) AUTO_INCREMENT,
 
7
KEY(id1), KEY(id)
 
8
) ENGINE=MyISAM;
 
9
CREATE TABLE `t2` (
 
10
`id` BIGINT(20) ,
 
11
`id1` BIGINT(20) AUTO_INCREMENT,
 
12
KEY (id1), KEY(id)
 
13
) ENGINE=MyISAM;
 
14
INSERT INTO t2 (id) VALUES (123);
 
15
INSERT INTO t2 (id) SELECT id  FROM t2;
 
16
INSERT INTO t2 (id) SELECT id  FROM t2;
 
17
INSERT INTO t2 (id) SELECT id  FROM t2;
 
18
INSERT INTO t2 (id) SELECT id  FROM t2;
 
19
INSERT INTO t2 (id) SELECT id  FROM t2;
 
20
INSERT INTO t2 (id) SELECT id  FROM t2;
 
21
INSERT INTO t2 (id) SELECT id  FROM t2;
 
22
INSERT INTO t2 (id) SELECT id  FROM t2;
 
23
INSERT INTO t2 (id) SELECT id  FROM t2;
 
24
INSERT INTO t2 (id) SELECT id  FROM t2;
 
25
# Switch to insert Connection
 
26
SET SESSION debug='+d,wait_in_enable_indexes';
 
27
# Send insert data
 
28
INSERT INTO t1(id) SELECT id  FROM t2;
 
29
# Switch to default Connection
 
30
# Wait for insert data to reach the debug point
 
31
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
 
32
WHERE STATE = 'wait_in_enable_indexes' AND 
 
33
INFO = "INSERT INTO t1(id) SELECT id  FROM t2" 
 
34
INTO @thread_id;
 
35
KILL QUERY @thread_id;
 
36
CHECK TABLE t1;
 
37
Table   Op      Msg_type        Msg_text
 
38
test.t1 check   status  OK
 
39
DROP TABLE t1,t2;