~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/t/dirty_close.test

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--source include/not_embedded.inc
 
2
 
1
3
connect (con1,localhost,root,,);
2
4
connect (con2,localhost,root,,);
3
5
connection con1;
12
14
insert into t1 values (1),(2),(3);
13
15
select * from t1;
14
16
drop table t1;
 
17
disconnect con2;
15
18
 
16
19
# End of 4.1 tests
 
20
 
 
21
#
 
22
# Bug#10374 GET_LOCK does not let connection to close on the server side if it's aborted
 
23
#
 
24
 
 
25
connection default;
 
26
SELECT GET_LOCK("dangling", 0);
 
27
connect(con1, localhost, root,,);
 
28
connection con1;
 
29
--send SELECT GET_LOCK('dangling', 3600);
 
30
connection default;
 
31
let $wait_condition=
 
32
  SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = "User lock"
 
33
  AND INFO = "SELECT GET_LOCK('dangling', 3600)";
 
34
--source include/wait_condition.inc
 
35
dirty_close con1;
 
36
let $wait_condition=
 
37
  SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = "User lock"
 
38
  AND INFO = "SELECT GET_LOCK('dangling', 3600)";
 
39
--source include/wait_condition.inc
 
40
connect(con1, localhost, root,,);
 
41
--send SELECT GET_LOCK('dangling', 3600);
 
42
connection default;
 
43
let $wait_condition=
 
44
  SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = "User lock"
 
45
  AND INFO = "SELECT GET_LOCK('dangling', 3600)";
 
46
--source include/wait_condition.inc
 
47
SELECT RELEASE_LOCK('dangling');
 
48
connection con1;
 
49
--reap
 
50
connection default;
 
51
disconnect con1;