Commit ed64190b authored by Bjorn Munch's avatar Bjorn Munch

Bug #49269 mysqltest crashes on 'reap' if query executed after 'send'

Small amendment: ignore pending reap when switching connection, add test
parent 90b24e99
...@@ -4622,6 +4622,7 @@ void select_connection_name(const char *name) ...@@ -4622,6 +4622,7 @@ void select_connection_name(const char *name)
if (!con) if (!con)
die("connection '%s' not found in connection pool", name); die("connection '%s' not found in connection pool", name);
con->pending= FALSE;
set_current_connection(con); set_current_connection(con);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
......
...@@ -542,6 +542,13 @@ f1 ...@@ -542,6 +542,13 @@ f1
Abcd Abcd
mysqltest: At line 2: Cannot run query on connection between send and reap mysqltest: At line 2: Cannot run query on connection between send and reap
select * from t1;; select * from t1;;
select * from t1;;
select 1;
1
1
select 2;
2
2
drop table t1; drop table t1;
mysqltest: At line 1: Missing required argument 'filename' to command 'remove_file' mysqltest: At line 1: Missing required argument 'filename' to command 'remove_file'
mysqltest: At line 1: Missing required argument 'filename' to command 'write_file' mysqltest: At line 1: Missing required argument 'filename' to command 'write_file'
......
...@@ -1654,6 +1654,18 @@ EOF ...@@ -1654,6 +1654,18 @@ EOF
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in 2>&1 --exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.in; remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.in;
# 7. Test that stmt after send without reap IS allowed
# if we have switched connections
connect (test_con1,localhost,root,,);
--send select * from t1;
connection default;
select 1;
connection test_con1;
select 2;
disconnect test_con1;
connection default;
drop table t1; drop table t1;
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment