~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/kill.test

  • Committer: Monty Taylor
  • Date: 2008-07-26 16:22:28 UTC
  • mto: (236.1.42 codestyle)
  • mto: This revision was merged to the branch mainline in revision 261.
  • Revision ID: monty@inaugust.com-20080726162228-atatk41l6w4np70m
Added gettext calls in to my_getopt.c and drizzle.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Disable concurrent inserts to avoid test failures when reading the
2
 
# connection id which was inserted into a table by another thread.
3
 
connect (con1, localhost, root,,);
4
 
connect (con2, localhost, root,,);
5
 
 
6
 
#remember id of con1
7
 
connection con1;
8
 
--disable_warnings
9
 
drop table if exists t1, t2, t3;
10
 
--enable_warnings
11
 
 
12
 
--disable_reconnect
13
 
create table t1 (kill_id int);
14
 
insert into t1 values(connection_id());
15
 
 
16
 
#kill con1
17
 
connection con2;
18
 
select ((@id := kill_id) - kill_id) from t1; 
19
 
kill @id;
20
 
 
21
 
connection con1;
22
 
--sleep 2
23
 
 
24
 
--disable_query_log
25
 
--disable_result_log
26
 
 
27
 
# One of the following statements should fail
28
 
--error EE_OK,EE_BADCLOSE,EE_UNKNOWN_CHARSET,EE_CANT_SYMLINK
29
 
select 1;
30
 
 
31
 
--error EE_OK,EE_BADCLOSE,EE_UNKNOWN_CHARSET,EE_CANT_SYMLINK
32
 
select 1;
33
 
 
34
 
--enable_query_log
35
 
--enable_result_log
36
 
 
37
 
--enable_reconnect
38
 
# this should work, and we should have a new connection_id()
39
 
select ((@id := kill_id) - kill_id) from t1;
40
 
select @id != connection_id();
41
 
 
42
 
#make sure the server is still alive
43
 
connection con2;
44
 
select 4;
45
 
drop table t1;
46
 
connection default;
47
 
 
48
 
#
49
 
# BUG#14851: killing long running subquery processed via a temporary table.
50
 
#
51
 
create table t1 (id int primary key);
52
 
create table t2 (id int not null);
53
 
 
54
 
connect (conn1, localhost, root,,);
55
 
connection conn1;
56
 
 
57
 
begin;
58
 
let $1 = 4096;
59
 
while ($1)
60
 
{
61
 
  eval insert into t1 values ($1);
62
 
  dec $1;
63
 
}
64
 
commit;
65
 
 
66
 
insert into t2 select id from t1;
67
 
 
68
 
create table t3 (kill_id int);
69
 
insert into t3 values(connection_id());
70
 
connect (conn2, localhost, root,,);
71
 
connection conn2;
72
 
 
73
 
connection conn1;
74
 
# This is a very long running query. If this test start failing, it may
75
 
# be necessary to change to an even longer query.
76
 
send select id from t1 where id in (select distinct a.id from t2 a, t2 b, t2 c, t2 d group by a.id, b.id, c.id, d.id having a.id between 10 and 20);
77
 
 
78
 
connection conn2;
79
 
select ((@id := kill_id) - kill_id) from t3;
80
 
kill @id;
81
 
 
82
 
connection conn1;
83
 
#-- error 1053,2013,1104
84
 
--error ER_SERVER_SHUTDOWN, ER_TOO_BIG_SELECT
85
 
reap;
86
 
 
87
 
connection default;
88
 
 
89
 
drop table t1, t2, t3;
90
 
 
91
 
# End of 4.1 tests
92
 
 
93
 
# Fix issue with kill $
94
 
#create table t1(f1 int);
95
 
#
96
 
## Test UPDATE
97
 
#insert into t1 values(0);
98
 
#connection con2;
99
 
#send update t1 set f1= bug27563();
100
 
#real_sleep 2;
101
 
#connection con1;
102
 
#disable_query_log;
103
 
#kill query $ID;
104
 
#enable_query_log;
105
 
#connection con2;
106
 
#--error ER_QUERY_INTERRUPTED
107
 
#reap;
108
 
#select @a;
109
 
#connection con1;
110
 
#select * from t1;
111
 
#
112
 
## Test DELETE
113
 
#insert into t1 values(1);
114
 
#connection con2;
115
 
#send delete from t1 where bug27563() is null;
116
 
#real_sleep 2;
117
 
#connection con1;
118
 
#disable_query_log;
119
 
#eval kill query $ID;
120
 
#enable_query_log;
121
 
#connection con2;
122
 
#--error ER_QUERY_INTERRUPTED
123
 
#reap;
124
 
#select @a;
125
 
#connection con1;
126
 
#select * from t1;
127
 
#
128
 
## Test SELECT
129
 
#connection con2;
130
 
#send select * from t1 where f1= bug27563();
131
 
#real_sleep 2;
132
 
#connection con1;
133
 
#disable_query_log;
134
 
#eval kill query $ID;
135
 
#enable_query_log;
136
 
#connection con2;
137
 
#--error ER_QUERY_INTERRUPTED
138
 
#reap;
139
 
#select @a;
140
 
#
141
 
#
142
 
###########################################################################
143
 
 
144
 
--echo #
145
 
--echo # Bug#19723: kill of active connection yields different error code
146
 
--echo # depending on platform.
147
 
--echo #
148
 
 
149
 
--echo
150
 
--echo # Connection: con2.
151
 
--connection con2
152
 
 
153
 
KILL CONNECTION_ID();
154
 
 
155
 
--echo # CR_SERVER_LOST, CR_SERVER_GONE_ERROR, depending on the timing 
156
 
--echo # of close of the connection socket
157
 
 
158
 
--error EE_OK,EE_BADCLOSE,EE_UNKNOWN_CHARSET,EE_CANT_SYMLINK
159
 
SELECT 1;
160
 
 
161
 
--connection default
162
 
 
163
 
###########################################################################