~ubuntu-branches/ubuntu/lucid/mysql-dfsg-5.1/lucid-security

« back to all changes in this revision

Viewing changes to mysql-test/suite/innodb_plugin/t/innodb_bug51920.test

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 22:33:55 UTC
  • mto: (1.2.1) (37.1.1 lucid-security)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: package-import@ubuntu.com-20120222223355-ku1tb4r70osci6v2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Bug #51920: InnoDB connections in lock wait ignore KILL until timeout
 
3
#
 
4
-- source include/not_embedded.inc
 
5
-- source include/have_innodb_plugin.inc
 
6
 
 
7
CREATE TABLE bug51920 (i INT) ENGINE=InnoDB;
 
8
INSERT INTO bug51920 VALUES (1);
 
9
 
 
10
BEGIN;
 
11
SELECT * FROM bug51920 FOR UPDATE;
 
12
 
 
13
connect (con1,localhost,root,,);
 
14
 
 
15
connection con1;
 
16
--send
 
17
UPDATE bug51920 SET i=2;
 
18
 
 
19
connection default;
 
20
let $wait_condition =
 
21
  SELECT COUNT(*)=1 FROM information_schema.processlist
 
22
  WHERE INFO="UPDATE bug51920 SET i=2";
 
23
-- source include/wait_condition.inc
 
24
 
 
25
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
 
26
WHERE INFO="UPDATE bug51920 SET i=2"
 
27
INTO @thread_id;
 
28
 
 
29
KILL @thread_id;
 
30
let $wait_condition =
 
31
  SELECT COUNT(*)=0 FROM information_schema.processlist WHERE ID=@thread_id;
 
32
-- source include/wait_condition.inc
 
33
 
 
34
#
 
35
# Bug#19723: kill of active connection yields different error code
 
36
# depending on platform.
 
37
#
 
38
connection con1;
 
39
-- error 1317, 2006, 2013
 
40
reap;
 
41
connection default;
 
42
DROP TABLE bug51920;
 
43
-- disconnect con1