summaryrefslogtreecommitdiff
path: root/mysql-test/t/packet.test
diff options
context:
space:
mode:
authorMatthias Leich <Matthias.Leich@sun.com>2009-02-05 21:47:23 +0100
committerMatthias Leich <Matthias.Leich@sun.com>2009-02-05 21:47:23 +0100
commit41e6a1f89c943083e46fba9f548333629eefbbd9 (patch)
treee767d62e647bd5bd95395a64bbef983632f63971 /mysql-test/t/packet.test
parent6f19c0fc46de7840431e38e7a5e6610124d05179 (diff)
downloadmariadb-git-41e6a1f89c943083e46fba9f548333629eefbbd9.tar.gz
2. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default
- If missing: add "disconnect <session>" - If physical disconnect of non "default" sessions is not finished at test end: add routine which waits till this happened + additional improvements - remove superfluous files created by the test - replace error numbers by error names - remove trailing spaces, replace tabs by spaces - unify writing of bugs within comments - correct comments - minor changes of formatting Fixed tests: backup check compress grant information_schema multi_update overflow packet query_cache_not_embedded sp-threads subselect synchronization timezone_grant
Diffstat (limited to 'mysql-test/t/packet.test')
-rw-r--r--mysql-test/t/packet.test20
1 files changed, 18 insertions, 2 deletions
diff --git a/mysql-test/t/packet.test b/mysql-test/t/packet.test
index 4de284b7824..6210e9986ad 100644
--- a/mysql-test/t/packet.test
+++ b/mysql-test/t/packet.test
@@ -4,12 +4,18 @@
# swallowing them and returning an error
--source include/not_windows.inc
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+
#
# Check protocol handling
#
-connect (con1,localhost,root,,);
+set @max_allowed_packet=@@global.max_allowed_packet;
+set @net_buffer_length=@@global.net_buffer_length;
+connect (con1,localhost,root,,);
connection con1;
set global max_allowed_packet=100;
set max_allowed_packet=100;
@@ -19,6 +25,8 @@ set net_buffer_length=100;
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
# Should return NULL as 2000 is bigger than max_allowed_packet
select repeat('a',2000);
+connection default;
+disconnect con1;
#
# Connection 2 should get error for too big packets
@@ -26,7 +34,7 @@ select repeat('a',2000);
connect (con2,localhost,root,,);
connection con2;
select @@net_buffer_length, @@max_allowed_packet;
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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
set global max_allowed_packet=default;
set max_allowed_packet=default;
@@ -34,5 +42,13 @@ set global net_buffer_length=default;
set net_buffer_length=default;
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
select length(repeat('a',2000));
+connection default;
+disconnect con2;
+
+set global max_allowed_packet=@max_allowed_packet;
+set global net_buffer_length=@net_buffer_length;
# End of 4.1 tests
+
+# Wait till we reached the initial number of concurrent sessions
+--source include/wait_until_count_sessions.inc