~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/kill.result

  • Committer: Brian Aker
  • Date: 2008-11-04 15:39:09 UTC
  • mfrom: (575.1.2 devel)
  • Revision ID: brian@tangent.org-20081104153909-c72hn65udxs1ccal
Merge of Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
set @old_concurrent_insert= @@global.concurrent_insert;
2
 
set @@global.concurrent_insert= 0;
3
1
drop table if exists t1, t2, t3;
4
2
create table t1 (kill_id int);
5
3
insert into t1 values(connection_id());
17
15
4
18
16
4
19
17
drop table t1;
20
 
kill (select count(*) from mysql.user);
21
 
ERROR 42000: This version of MySQL doesn't yet support 'Usage of subqueries or stored function calls as part of this statement'
22
18
create table t1 (id int primary key);
23
 
create table t2 (id int unsigned not null);
 
19
create table t2 (id int not null);
24
20
insert into t2 select id from t1;
25
21
create table t3 (kill_id int);
26
22
insert into t3 values(connection_id());
31
27
kill @id;
32
28
Got one of the listed errors
33
29
drop table t1, t2, t3;
34
 
select get_lock("a", 10);
35
 
get_lock("a", 10)
36
 
1
37
 
select get_lock("a", 10);
38
 
get_lock("a", 10)
39
 
NULL
40
 
select 1;
41
 
1
42
 
1
43
 
select RELEASE_LOCK("a");
44
 
RELEASE_LOCK("a")
45
 
1
46
 
create table t1(f1 int);
47
 
create function bug27563() returns int(11)
48
 
deterministic
49
 
begin
50
 
declare continue handler for sqlstate '70100' set @a:= 'killed';
51
 
declare continue handler for sqlexception set @a:= 'exception';
52
 
set @a= get_lock("lock27563", 10);
53
 
return 1;
54
 
end|
55
 
select get_lock("lock27563",10);
56
 
get_lock("lock27563",10)
57
 
1
58
 
insert into t1 values (bug27563());
59
 
ERROR 70100: Query execution was interrupted
60
 
select @a;
61
 
@a
62
 
NULL
63
 
select * from t1;
64
 
f1
65
 
insert into t1 values(0);
66
 
update t1 set f1= bug27563();
67
 
ERROR 70100: Query execution was interrupted
68
 
select @a;
69
 
@a
70
 
NULL
71
 
select * from t1;
72
 
f1
73
 
0
74
 
insert into t1 values(1);
75
 
delete from t1 where bug27563() is null;
76
 
ERROR 70100: Query execution was interrupted
77
 
select @a;
78
 
@a
79
 
NULL
80
 
select * from t1;
81
 
f1
82
 
0
83
 
1
84
 
select * from t1 where f1= bug27563();
85
 
ERROR 70100: Query execution was interrupted
86
 
select @a;
87
 
@a
88
 
NULL
89
 
create procedure proc27563()
90
 
begin
91
 
declare continue handler for sqlstate '70100' set @a:= 'killed';
92
 
declare continue handler for sqlexception set @a:= 'exception';
93
 
select get_lock("lock27563",10);
94
 
select "shouldn't be selected";
95
 
end|
96
 
call proc27563();
97
 
get_lock("lock27563",10)
98
 
NULL
99
 
ERROR 70100: Query execution was interrupted
100
 
select @a;
101
 
@a
102
 
NULL
103
 
create table t2 (f2 int);
104
 
create trigger trg27563 before insert on t1 for each row 
105
 
begin 
106
 
declare continue handler for sqlstate '70100' set @a:= 'killed';
107
 
declare continue handler for sqlexception set @a:= 'exception';
108
 
set @a:= get_lock("lock27563",10);
109
 
insert into t2 values(1);
110
 
end|
111
 
insert into t1 values(2),(3);
112
 
ERROR 70100: Query execution was interrupted
113
 
select @a;
114
 
@a
115
 
NULL
116
 
select * from t1;
117
 
f1
118
 
0
119
 
1
120
 
select * from t2;
121
 
f2
122
 
select release_lock("lock27563");
123
 
release_lock("lock27563")
124
 
1
125
 
drop table t1, t2;
126
 
drop function bug27563;
127
 
drop procedure proc27563;
128
 
PREPARE stmt FROM 'EXPLAIN SELECT * FROM t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40 WHERE a1=a2 AND a2=a3 AND a3=a4 AND a4=a5 AND a5=a6 AND a6=a7 AND a7=a8 AND a8=a9 AND a9=a10 AND a10=a11 AND a11=a12 AND a12=a13 AND a13=a14 AND a14=a15 AND a15=a16 AND a16=a17 AND a17=a18 AND a18=a19 AND a19=a20 AND a20=a21 AND a21=a22 AND a22=a23 AND a23=a24 AND a24=a25 AND a25=a26 AND a26=a27 AND a27=a28 AND a28=a29 AND a29=a30 AND a30=a31 AND a31=a32 AND a32=a33 AND a33=a34 AND a34=a35 AND a35=a36 AND a36=a37 AND a37=a38 AND a38=a39 AND a39=a40  ';
129
 
EXECUTE stmt;
130
30
#
131
31
# Bug#19723: kill of active connection yields different error code
132
32
# depending on platform.
138
38
# of close of the connection socket
139
39
SELECT 1;
140
40
Got one of the listed errors
141
 
set @@global.concurrent_insert= @old_concurrent_insert;