From 6f1077a9a67cddac6e4944f826d72cfcc0b682bb Mon Sep 17 00:00:00 2001 From: vasil Date: Tue, 9 Dec 2008 09:21:08 +0000 Subject: [PATCH] branches/5.1: Merge a change from MySQL to fix the failing innodb_bug34300 mysql-test: main.innodb_bug34300 [ fail ] mysqltest: At line 11: query 'SET @@max_allowed_packet=16777216' failed: 1621: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value Aborting: main.innodb_bug34300 failed in default mode. The changeset is this: ------------------------------------------------------------ revno: 2709.1.10 committer: Staale Smedseng branch nick: b22891-51-bugteam timestamp: Thu 2008-11-20 08:51:48 +0100 message: A fix for Bug#22891 "session level max_allowed_packet can be set but is ignored". This patch makes @@session.max_allowed_packed and @@session.net_buffer_length read-only as suggested in the bug report. The user will have to use SET GLOBAL (and reconnect) to alter the session values of these variables. The error string ER_VARIABLE_IS_READONLY is introduced. Tests are modified accordingly. modified: mysql-test/r/func_compress.result mysql-test/r/max_allowed_packet_basic.result mysql-test/r/max_allowed_packet_func.result mysql-test/r/net_buffer_length_basic.result mysql-test/r/packet.result mysql-test/r/union.result mysql-test/r/variables.result mysql-test/t/func_compress.test mysql-test/t/innodb_bug34300.test mysql-test/t/max_allowed_packet_basic.test mysql-test/t/max_allowed_packet_func.test mysql-test/t/net_buffer_length_basic.test mysql-test/t/packet.test mysql-test/t/union.test mysql-test/t/variables.test sql/set_var.cc sql/set_var.h sql/share/errmsg.txt ------------------------------------------------------------ --- mysql-test/innodb_bug34300.test | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mysql-test/innodb_bug34300.test b/mysql-test/innodb_bug34300.test index 4b4a3fdc8a3..114bcf98c25 100644 --- a/mysql-test/innodb_bug34300.test +++ b/mysql-test/innodb_bug34300.test @@ -8,7 +8,9 @@ -- disable_query_log -- disable_result_log -SET @@max_allowed_packet=16777216; +# set packet size and reconnect +SET @@global.max_allowed_packet=16777216; +--connect (newconn, localhost, root,,) DROP TABLE IF EXISTS bug34300; CREATE TABLE bug34300 (