diff options
author | unknown <dkatz@damien-katzs-computer.local> | 2007-07-12 22:19:07 -0400 |
---|---|---|
committer | unknown <dkatz@damien-katzs-computer.local> | 2007-07-12 22:19:07 -0400 |
commit | 91112d124e0daf124a838c636ec93eed470aeb3d (patch) | |
tree | adc9784cf5be803bf9e1400231ed12fe3144b96b /mysql-test | |
parent | b2bf1ddfc0ba31cb8f68eec78c623a85466ef2ea (diff) | |
parent | b7527f6b72cbd3d919671ed15262b1893166e125 (diff) | |
download | mariadb-git-91112d124e0daf124a838c636ec93eed470aeb3d.tar.gz |
Merge damien-katzs-computer.local:/Users/dkatz/mysql50
into damien-katzs-computer.local:/Users/dkatz/50
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ssl-big.result | 3 | ||||
-rw-r--r-- | mysql-test/t/ssl-big.test | 56 | ||||
-rw-r--r-- | mysql-test/t/ssl_big.test | 62 |
3 files changed, 121 insertions, 0 deletions
diff --git a/mysql-test/r/ssl-big.result b/mysql-test/r/ssl-big.result new file mode 100644 index 00000000000..39c4f34e46c --- /dev/null +++ b/mysql-test/r/ssl-big.result @@ -0,0 +1,3 @@ +DROP TABLE IF EXISTS t1, t2; +create table t1 (a int); +drop table t1; diff --git a/mysql-test/t/ssl-big.test b/mysql-test/t/ssl-big.test new file mode 100644 index 00000000000..099c64df08f --- /dev/null +++ b/mysql-test/t/ssl-big.test @@ -0,0 +1,56 @@ +# Turn on ssl between the client and server +# and run a number of tests + +-- source include/have_ssl.inc +-- source include/big_test.inc + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +# +# Bug #29579 Clients using SSL can hang the server +# + +connect (ssl_con,localhost,root,,,,,SSL); + +create table t1 (a int); + +disconnect ssl_con; + + +--disable_query_log +--disable_result_log + +let $count= 2000; +while ($count) +{ + connect (ssl_con,localhost,root,,,,,SSL); + + eval insert into t1 values ($count); + dec $count; + + # This select causes the net buffer to fill as the server sends the results + # but the client doesn't reap the results. The results are larger each time + # through the loop, so that eventually the buffer is completely full + # at the exact moment the server attempts to the close the connection with + # the lock held. + send select * from t1; + + # now send the quit the command so the server will initiate the shutdown. + send_quit ssl_con; + + # if the server is hung, this will hang too: + connect (ssl_con2,localhost,root,,,,,SSL); + + # no hang if we get here, close and retry + disconnect ssl_con2; + disconnect ssl_con; +} +--enable_query_log +--enable_result_log + +connect (ssl_con,localhost,root,,,,,SSL); + +drop table t1; + diff --git a/mysql-test/t/ssl_big.test b/mysql-test/t/ssl_big.test new file mode 100644 index 00000000000..58c11899e55 --- /dev/null +++ b/mysql-test/t/ssl_big.test @@ -0,0 +1,62 @@ +# Turn on ssl between the client and server +# and run a number of tests + +-- source include/have_ssl.inc + +connect (ssl_con,localhost,root,,,,,SSL); + +# Check ssl turned on +SHOW STATUS LIKE 'Ssl_cipher'; + +# Source select test case +-- source include/common-tests.inc + +# Check ssl turned on +SHOW STATUS LIKE 'Ssl_cipher'; + +disconnect ssl_con; + + +# +# Bug #29579 Clients using SSL can hang the server +# + +connect (ssl_con,localhost,root,,,,,SSL); + +create table t1 (a int); + +disconnect ssl_con; + +let $count= 2000; +while ($count) +{ + + connect (ssl_con,localhost,root,,,,,SSL); + + let $i= 1; + while ($i) + { + eval insert into t1 values ($count); + dec $count; + dec $i; + } + + # This select causes the net buffer to fill as the server sends the results + # but the client doesn't reap the results. The results are larger each time + # through the loop, so that eventually the buffer is completely full + # at the exact moment the server attempts to the close the connection with + # the lock held. + send select * from t1; + + # now send the quit the command so the server will initiate the shutdown. + send_quit ssl_con; + + # if the server is hung, this will hang too: + connect (ssl_con2,localhost,root,,,,,SSL); + + # no hang if we get here, close and retry + disconnect ssl_con2; + + disconnect ssl_con; +} + |