~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

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.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