1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1

into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug8-4.1
This commit is contained in:
bell@sanja.is.com.ua
2006-01-26 16:00:49 +02:00
5 changed files with 87 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
drop table if exists t1;
drop table if exists t1, t2, t3;
create table t1 (kill_id int);
insert into t1 values(connection_id());
select ((@id := kill_id) - kill_id) from t1;
@@ -17,3 +17,15 @@ select 4;
4
4
drop table t1;
create table t1 (id int primary key);
create table t2 (id int unsigned not null);
insert into t2 select id from t1;
create table t3 (kill_id int);
insert into t3 values(connection_id());
select id from t1 where id in (select distinct id from t2);
select ((@id := kill_id) - kill_id) from t3;
((@id := kill_id) - kill_id)
0
kill @id;
ERROR 08S01: Server shutdown in progress
drop table t1, t2, t3;

View File

@@ -12,7 +12,7 @@ connect (con2, localhost, root,,);
#remember id of con1
connection con1;
--disable_warnings
drop table if exists t1;
drop table if exists t1, t2, t3;
--enable_warnings
create table t1 (kill_id int);
@@ -40,4 +40,51 @@ connection con2;
select 4;
drop table t1;
disconnect con2;
connection default;
#
# BUG#14851: killing long running subquery processed via a temporary table.
#
create table t1 (id int primary key);
create table t2 (id int unsigned not null);
connect (conn1, localhost, root,,);
connection conn1;
-- disable_result_log
-- disable_query_log
let $1 = 4096;
while ($1)
{
eval insert into t1 values ($1);
dec $1;
}
-- enable_query_log
-- enable_result_log
insert into t2 select id from t1;
create table t3 (kill_id int);
insert into t3 values(connection_id());
-- disable_result_log
send select id from t1 where id in (select distinct id from t2);
-- enable_result_log
connect (conn2, localhost, root,,);
connection conn2;
select ((@id := kill_id) - kill_id) from t3;
-- sleep 1
kill @id;
connection conn1;
-- error 1053
reap;
disconnect conn1;
disconnect conn2;
connection default;
drop table t1, t2, t3;
# End of 4.1 tests