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

« back to all changes in this revision

Viewing changes to mysql-test/t/dirty_close.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
--source include/not_embedded.inc
 
2
 
 
3
# Save the initial number of concurrent sessions
 
4
--source include/count_sessions.inc
 
5
 
 
6
connect (con1,localhost,root,,);
 
7
connect (con2,localhost,root,,);
 
8
connection con1;
 
9
dirty_close con1;
 
10
connection con2;
 
11
 
 
12
--disable_warnings
 
13
DROP TABLE IF EXISTS t1;
 
14
--enable_warnings
 
15
 
 
16
CREATE TABLE t1 (n INT);
 
17
INSERT INTO t1 VALUES (1),(2),(3);
 
18
SELECT * FROM t1;
 
19
DROP TABLE t1;
 
20
 
 
21
connection default;
 
22
disconnect con2;
 
23
 
 
24
# End of 4.1 tests
 
25
 
 
26
#
 
27
# Bug#10374 GET_LOCK does not let connection to close on the server side if it's aborted
 
28
#
 
29
 
 
30
connection default;
 
31
SELECT GET_LOCK("dangling", 0);
 
32
connect(con1, localhost, root,,);
 
33
connection con1;
 
34
--send SELECT GET_LOCK('dangling', 3600);
 
35
connection default;
 
36
let $wait_condition=
 
37
  SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = "User lock"
 
38
  AND INFO = "SELECT GET_LOCK('dangling', 3600)";
 
39
--source include/wait_condition.inc
 
40
dirty_close con1;
 
41
let $wait_condition=
 
42
  SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = "User lock"
 
43
  AND INFO = "SELECT GET_LOCK('dangling', 3600)";
 
44
--source include/wait_condition.inc
 
45
connect(con1, localhost, root,,);
 
46
--send SELECT GET_LOCK('dangling', 3600);
 
47
connection default;
 
48
let $wait_condition=
 
49
  SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = "User lock"
 
50
  AND INFO = "SELECT GET_LOCK('dangling', 3600)";
 
51
--source include/wait_condition.inc
 
52
SELECT RELEASE_LOCK('dangling');
 
53
connection con1;
 
54
--reap
 
55
connection default;
 
56
disconnect con1;
 
57
 
 
58
# Wait till all disconnects are completed
 
59
--source include/wait_until_count_sessions.inc
 
60