Clean up a test
At the end of a test, 'connection default' should be in a usable state. This was not the case, because there was a preceding 'send' without a 'reap'. If 'reap' was added, an error would be reported because the server was restarted after the 'send'. It is easiest to 'send' from a separate connection and do the restart from 'connection default'.
This commit is contained in:
parent
d897b4dc25
commit
1b335a74b4
@ -3314,10 +3314,10 @@ WITH recursive cte AS
|
|||||||
(SELECT 1 a UNION SELECT cte.* FROM cte natural join t1)
|
(SELECT 1 a UNION SELECT cte.* FROM cte natural join t1)
|
||||||
SELECT * FROM cte limit 1
|
SELECT * FROM cte limit 1
|
||||||
);
|
);
|
||||||
SELECT func();;
|
|
||||||
connect con1,localhost,root,,;
|
connect con1,localhost,root,,;
|
||||||
KILL QUERY 4;
|
SELECT func();
|
||||||
|
connection default;
|
||||||
|
KILL QUERY 5;
|
||||||
DROP FUNCTION func;
|
DROP FUNCTION func;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
disconnect con1;
|
disconnect con1;
|
||||||
connection default;
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
--source include/not_embedded.inc
|
||||||
create table t1 (a int, b varchar(32));
|
create table t1 (a int, b varchar(32));
|
||||||
insert into t1 values
|
insert into t1 values
|
||||||
(4,'aaaa' ), (7,'bb'), (1,'ccc'), (4,'dd');
|
(4,'aaaa' ), (7,'bb'), (1,'ccc'), (4,'dd');
|
||||||
@ -2342,15 +2343,14 @@ RETURN
|
|||||||
SELECT * FROM cte limit 1
|
SELECT * FROM cte limit 1
|
||||||
);
|
);
|
||||||
|
|
||||||
--let $conid= `SELECT CONNECTION_ID()`
|
|
||||||
--send SELECT func();
|
|
||||||
|
|
||||||
--connect (con1,localhost,root,,)
|
--connect (con1,localhost,root,,)
|
||||||
|
--let $conid= `SELECT CONNECTION_ID()`
|
||||||
|
--send SELECT func()
|
||||||
|
|
||||||
|
--connection default
|
||||||
--eval KILL QUERY $conid
|
--eval KILL QUERY $conid
|
||||||
--source include/restart_mysqld.inc
|
--source include/restart_mysqld.inc
|
||||||
|
|
||||||
DROP FUNCTION func;
|
DROP FUNCTION func;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
--disconnect con1
|
--disconnect con1
|
||||||
|
|
||||||
--connection default
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user