~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/kill.test

  • Committer: Monty Taylor
  • Date: 2008-10-20 08:48:34 UTC
  • mfrom: (520.1.22 drizzle)
  • Revision ID: monty@inaugust.com-20081020084834-xpb3w01vkcp55o02
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Disable concurrent inserts to avoid test failures when reading the
2
2
# connection id which was inserted into a table by another thread.
3
 
set @old_concurrent_insert= @@global.concurrent_insert;
4
 
set @@global.concurrent_insert= 0;
5
 
 
6
3
connect (con1, localhost, root,,);
7
4
connect (con2, localhost, root,,);
8
5
 
45
42
drop table t1;
46
43
connection default;
47
44
 
48
 
--error ER_NOT_SUPPORTED_YET
49
 
kill (select count(*) from mysql.user);
50
 
 
51
45
#
52
46
# BUG#14851: killing long running subquery processed via a temporary table.
53
47
#
88
82
kill @id;
89
83
 
90
84
connection conn1;
 
85
-- error 1053,2013,1104
91
86
reap;
92
87
 
93
88
connection default;
97
91
 
98
92
# End of 4.1 tests
99
93
 
100
 
#
101
 
# test of blocking of sending ERROR after OK or EOF
102
 
#
103
 
connection con1;
104
 
select get_lock("a", 10);
105
 
connection con2;
106
 
let $ID= `select connection_id()`;
107
 
send select get_lock("a", 10);
108
 
real_sleep 2;
109
 
connection con1;
110
 
disable_query_log;
111
 
eval kill query $ID;
112
 
enable_query_log;
113
 
connection con2;
114
 
reap;
115
 
select 1;
116
 
connection con1;
117
 
select RELEASE_LOCK("a");
118
 
 
119
 
create table t1(f1 int);
120
 
 
121
 
 
122
 
# Test UPDATE
123
 
insert into t1 values(0);
124
 
connection con2;
125
 
send update t1 set f1= bug27563();
126
 
real_sleep 2;
127
 
connection con1;
128
 
disable_query_log;
129
 
eval kill query $ID;
130
 
enable_query_log;
131
 
connection con2;
132
 
--error 1317
133
 
reap;
134
 
select @a;
135
 
connection con1;
136
 
select * from t1;
137
 
 
138
 
# Test DELETE
139
 
insert into t1 values(1);
140
 
connection con2;
141
 
send delete from t1 where bug27563() is null;
142
 
real_sleep 2;
143
 
connection con1;
144
 
disable_query_log;
145
 
eval kill query $ID;
146
 
enable_query_log;
147
 
connection con2;
148
 
--error 1317
149
 
reap;
150
 
select @a;
151
 
connection con1;
152
 
select * from t1;
153
 
 
154
 
# Test SELECT
155
 
connection con2;
156
 
send select * from t1 where f1= bug27563();
157
 
real_sleep 2;
158
 
connection con1;
159
 
disable_query_log;
160
 
eval kill query $ID;
161
 
enable_query_log;
162
 
connection con2;
163
 
--error 1317
164
 
reap;
165
 
select @a;
166
 
 
167
 
 
 
94
# Fix issue with kill $
 
95
#create table t1(f1 int);
 
96
#
 
97
## Test UPDATE
 
98
#insert into t1 values(0);
 
99
#connection con2;
 
100
#send update t1 set f1= bug27563();
 
101
#real_sleep 2;
 
102
#connection con1;
 
103
#disable_query_log;
 
104
#kill query $ID;
 
105
#enable_query_log;
 
106
#connection con2;
 
107
#--error 1317
 
108
#reap;
 
109
#select @a;
 
110
#connection con1;
 
111
#select * from t1;
 
112
#
 
113
## Test DELETE
 
114
#insert into t1 values(1);
 
115
#connection con2;
 
116
#send delete from t1 where bug27563() is null;
 
117
#real_sleep 2;
 
118
#connection con1;
 
119
#disable_query_log;
 
120
#eval kill query $ID;
 
121
#enable_query_log;
 
122
#connection con2;
 
123
#--error 1317
 
124
#reap;
 
125
#select @a;
 
126
#connection con1;
 
127
#select * from t1;
 
128
#
 
129
## Test SELECT
 
130
#connection con2;
 
131
#send select * from t1 where f1= bug27563();
 
132
#real_sleep 2;
 
133
#connection con1;
 
134
#disable_query_log;
 
135
#eval kill query $ID;
 
136
#enable_query_log;
 
137
#connection con2;
 
138
#--error 1317
 
139
#reap;
 
140
#select @a;
 
141
#
 
142
#
168
143
###########################################################################
169
144
 
170
145
--echo #
185
160
--connection default
186
161
 
187
162
###########################################################################
188
 
 
189
 
# Restore global concurrent_insert value. Keep in the end of the test file.
190
 
set @@global.concurrent_insert= @old_concurrent_insert;