Commit 780a0aa0 authored by Bernt M. Johnsen's avatar Bernt M. Johnsen

Merged from gca-branch (bug 43110)

parents 83945e9d 00ac598a
......@@ -946,8 +946,13 @@ set global max_prepared_stmt_count=3;
select @@max_prepared_stmt_count;
show status like 'prepared_stmt_count';
prepare stmt from "select 1";
connect (con1,localhost,root,,);
# Switch to connection con1
connection con1;
let $con1_id=`SELECT CONNECTION_ID()`;
prepare stmt from "select 2";
prepare stmt1 from "select 3";
--error ER_MAX_PREPARED_STMT_COUNT_REACHED
......@@ -957,18 +962,17 @@ connection default;
prepare stmt2 from "select 4";
select @@max_prepared_stmt_count;
show status like 'prepared_stmt_count';
# Disconnect connection con1 and switch to default connection
disconnect con1;
connection default;
# Wait for the connection to die: deal with a possible race
# Wait for the connection con1 to die
let $wait_condition=SELECT COUNT(*)=0 FROM information_schema.processlist WHERE id=$con1_id;
--source include/wait_condition.inc
deallocate prepare stmt;
let $query= select variable_value from information_schema.global_status
where variable_name = 'prepared_stmt_count';
let $count= `$query`;
if ($count)
{
--sleep 1
let $count= `$query`;
}
select @@max_prepared_stmt_count;
show status like 'prepared_stmt_count';
#
......
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