--source include/have_innodb.inc connect (c0, localhost, root,,); connect (mgr, localhost, root,,,); connection c0; SET GLOBAL max_delayed_threads= 1; SET GLOBAL max_connections = 20; --disable_warnings drop database if exists connection_test; --enable_warnings create database connection_test; use connection_test; create table t ( c char(16) ) engine=innodb; set autocommit = 0; #send insert into t values ( 'Initial insert' ); connection mgr; connect (c1, localhost, root,,connection_test,); connect (c2, localhost, root,,connection_test,); connect (c3, localhost, root,,connection_test,); connect (c4, localhost, root,,connection_test,); connect (c5, localhost, root,,connection_test,); connect (c6, localhost, root,,connection_test,); connect (c7, localhost, root,,connection_test,); connect (c8, localhost, root,,connection_test,); connect (c9, localhost, root,,connection_test,); connect (c10, localhost, root,,connection_test,); connect (c11, localhost, root,,connection_test,); connect (c12, localhost, root,,connection_test,); connection c1; send update t set c = 'Updated'; connection c2; send update t set c = 'Updated'; connection c3; send update t set c = 'Updated'; connection c4; send update t set c = 'Updated'; connection c5; send update t set c = 'Updated'; connection c6; send update t set c = 'Updated'; connection c7; send update t set c = 'Updated'; connection c8; send update t set c = 'Updated'; connection c9; send update t set c = 'Updated'; connection c10; send update t set c = 'Updated'; connection c11; send update t set c = 'Updated'; connection c12; send update t set c = 'Updated'; sleep 3; connection mgr; SET GLOBAL max_connections = 2; connection c0; commit; sleep 1; disconnect c1; disconnect c2; disconnect c3; disconnect c4; disconnect c5; disconnect c6; disconnect c7; disconnect c8; disconnect c9; disconnect c10; disconnect c11; disconnect c12; sleep 1; connection c0; select "SERVER STILL ALIVE, no crash" from connection_test.t;