~drizzle-trunk/drizzle/development

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