diff options
author | Alexey Kopytov <Alexey.Kopytov@sun.com> | 2009-03-19 13:02:23 +0300 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@sun.com> | 2009-03-19 13:02:23 +0300 |
commit | afcfe81fea26b9f746ee7043c41d8dff52333067 (patch) | |
tree | 9424546483c3a3edb4240b5a965486d438031b9b /mysql-test/t/mysql.test | |
parent | 73a7d99331d8fd0819fb9f7a10081e393590a94d (diff) | |
download | mariadb-git-afcfe81fea26b9f746ee7043c41d8dff52333067.tar.gz |
Fixed test failures in 5.1/6.0 introduced by the patch
for bug #41486. Session max_allowed_packet is read-only
as of MySQL 5.1.31. In addition, the global variable
now has no effect on the current session.
Diffstat (limited to 'mysql-test/t/mysql.test')
-rw-r--r-- | mysql-test/t/mysql.test | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index 0030f624be6..f352c08fb5b 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -336,12 +336,16 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug31060.sql; # mysqldump/import # -# Have to change the global variable as the mysql client will use -# a separate session +# Have to change the global variable as the session variable is +# read-only. set @old_max_allowed_packet = @@global.max_allowed_packet; # 2 MB blob length + some space for the rest of INSERT query set @@global.max_allowed_packet = 2 * 1024 * 1024 + 1024; -set @@max_allowed_packet = @@global.max_allowed_packet; + +# Create a new connection since the global max_allowed_packet +# has no effect for the current connection +connect (con1, localhost, root,,); +connection con1; CREATE TABLE t1(data LONGBLOB); INSERT INTO t1 SELECT REPEAT('1', 2*1024*1024); @@ -355,7 +359,9 @@ SELECT LENGTH(data) FROM t1; remove_file $MYSQLTEST_VARDIR/tmp/bug41486.sql; DROP TABLE t1; +connection default; +disconnect con1; + set @@global.max_allowed_packet = @old_max_allowed_packet; -set @@max_allowed_packet = @@global.max_allowed_packet; --echo End of 5.0 tests |