1
set @old_concurrent_insert= @@global.concurrent_insert;
2
set @@global.concurrent_insert= 0;
3
drop table if exists t1,t3;
4
drop procedure if exists bug4902|
5
create procedure bug4902()
7
show grants for 'root'@'localhost';
10
Grants for root@localhost
11
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
13
Grants for root@localhost
14
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
15
drop procedure bug4902|
16
drop procedure if exists bug4902_2|
17
create procedure bug4902_2()
27
drop procedure bug4902_2|
28
drop table if exists t1|
30
id char(16) not null default '',
33
drop procedure if exists bug3583|
34
drop procedure if exists bug3583|
35
create procedure bug3583()
39
select count(*) into c from t1;
42
insert into t1 values ("x", 3), ("y", 5)|
43
set @x = @@query_cache_size|
44
set global query_cache_size = 10*1024*1024|
47
show status like 'Qcache_hits'|
56
show status like 'Qcache_hits'|
71
show status like 'Qcache_hits'|
74
set global query_cache_size = @x|
78
drop procedure bug3583|
80
drop procedure if exists bug6807|
81
create procedure bug6807()
84
set id = connection_id();
89
ERROR 70100: Query execution was interrupted
91
ERROR 70100: Query execution was interrupted
92
drop procedure bug6807|
93
drop function if exists bug10100f|
94
drop procedure if exists bug10100p|
95
drop procedure if exists bug10100t|
96
drop procedure if exists bug10100pt|
97
drop procedure if exists bug10100pv|
98
drop procedure if exists bug10100pd|
99
drop procedure if exists bug10100pc|
100
create function bug10100f(prm int) returns int
103
return prm * bug10100f(prm - 1);
107
create procedure bug10100p(prm int, inout res int)
111
call bug10100p(prm - 1, res);
114
create procedure bug10100t(prm int)
118
call bug10100p(prm, res);
121
create table t3 (a int)|
122
insert into t3 values (0)|
123
create view v1 as select a from t3;
124
create procedure bug10100pt(level int, lim int)
127
update t3 set a=level;
129
call bug10100pt(level+1, lim);
134
create procedure bug10100pv(level int, lim int)
137
update v1 set a=level;
139
call bug10100pv(level+1, lim);
144
prepare stmt2 from "select * from t3;";
145
create procedure bug10100pd(level int, lim int)
149
prepare stmt1 from "update t3 set a=a+2";
156
deallocate prepare stmt1;
159
call bug10100pd(level+1, lim);
164
create procedure bug10100pc(level int, lim int)
167
declare c cursor for select a from t3;
173
update t3 set a=level+lv;
175
call bug10100pc(level+1, lim);
181
set @@max_sp_recursion_depth=255|
183
call bug10100p(255, @var)|
184
call bug10100pt(1,255)|
185
call bug10100pv(1,255)|
186
call bug10100pd(1,255)|
187
call bug10100pc(1,255)|
188
set @@max_sp_recursion_depth=0|
189
deallocate prepare stmt2|
190
drop function bug10100f|
191
drop procedure bug10100p|
192
drop procedure bug10100t|
193
drop procedure bug10100pt|
194
drop procedure bug10100pv|
195
drop procedure bug10100pd|
196
drop procedure bug10100pc|
199
drop procedure if exists bug15298_1;
200
drop procedure if exists bug15298_2;
201
grant all privileges on test.* to 'mysqltest_1'@'localhost';
202
create procedure 15298_1 () sql security definer show grants for current_user;
203
create procedure 15298_2 () sql security definer show grants;
205
Grants for root@localhost
206
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
208
Grants for root@localhost
209
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
210
drop user mysqltest_1@localhost;
211
drop procedure 15298_1;
212
drop procedure 15298_2;
213
drop table if exists t1;
214
drop procedure if exists p1;
215
create table t1 (value varchar(15));
216
create procedure p1() update t1 set value='updated' where value='old';
218
insert into t1 (value) values ("old");
219
select get_lock('b26162',120);
220
get_lock('b26162',120)
222
select 'rl_acquirer', value from t1 where get_lock('b26162',120);;
223
set session low_priority_updates=on;
225
select 'rl_contender', value from t1;
228
select release_lock('b26162');
229
release_lock('b26162')
235
set session low_priority_updates=default;
236
INSERT INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv,
237
Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv,
238
Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv,
239
Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv,
240
Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv,
241
Create_user_priv, ssl_type, ssl_cipher, x509_issuer, x509_subject, max_questions,
242
max_updates, max_connections, max_user_connections)
243
VALUES('%', 'mysqltest_1', password(''), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N',
244
'N', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'Y', 'Y', 'N', '',
245
'', '', '', '0', '0', '0', '0');
247
CREATE PROCEDURE p1(i INT) BEGIN END;
249
DELETE FROM mysql.user WHERE User='mysqltest_1';
251
set @@global.concurrent_insert= @old_concurrent_insert;
253
# Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
255
SELECT GET_LOCK('Bug44521', 0);
256
GET_LOCK('Bug44521', 0)
262
SELECT GET_LOCK('Bug44521', 100);
266
** Default connection
267
SELECT RELEASE_LOCK('Bug44521');
268
RELEASE_LOCK('Bug44521')
271
CREATE TABLE t1(a int);
272
INSERT INTO t1 VALUES (1);
273
CREATE FUNCTION f1 (inp TEXT) RETURNS INT NO SQL RETURN sleep(60);
274
CREATE VIEW v1 AS SELECT f1('a') FROM t1;
277
ERROR 70100: Query execution was interrupted
278
ERROR 70100: Query execution was interrupted
282
# ------------------------------------------------------------------
283
# -- End of 5.1 tests
284
# ------------------------------------------------------------------