summaryrefslogtreecommitdiff
path: root/mysql-test/t/union.test
diff options
context:
space:
mode:
authorStaale Smedseng <staale.smedseng@sun.com>2008-11-20 08:51:48 +0100
committerStaale Smedseng <staale.smedseng@sun.com>2008-11-20 08:51:48 +0100
commitcf365da5561dc72a99e5190aaf392ebd1525f16d (patch)
tree59c64214e33797199c32b6cd187781eef4dcd755 /mysql-test/t/union.test
parent29107cccf99076749fcae6361a26e26ca05e0d17 (diff)
downloadmariadb-git-cf365da5561dc72a99e5190aaf392ebd1525f16d.tar.gz
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. sql/set_var.cc: The class sys_var_thd_ulong_session_readonly is introduced as a specialization of sys_var_thd_ulong implementing a read-only session variable. The class overrides check() and check_default() to achieve the read-only property for the session part of the variable. sql/set_var.h: The class sys_var_thd_ulong_session_readonly is introduced as a specialization of sys_var_thd_ulong implementing a read-only session variable. The class overrides check() and check_default() to achieve the read-only property for the session part of the variable. sql/share/errmsg.txt: New error ER_VARIABLE_IS_READONLY.
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r--mysql-test/t/union.test10
1 files changed, 7 insertions, 3 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index f58cd54250b..ad4d57b7128 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -861,8 +861,10 @@ drop tables t1,t2,t3;
# exceeds mediumtext maximum length
#
-SELECT @tmp_max:= @@max_allowed_packet;
-SET max_allowed_packet=25000000;
+SELECT @tmp_max:= @@global.max_allowed_packet;
+SET @@global.max_allowed_packet=25000000;
+# switching connection to allow the new max_allowed_packet take effect
+--connect (newconn, localhost, root,,)
CREATE TABLE t1 (a mediumtext);
CREATE TABLE t2 (b varchar(20));
INSERT INTO t1 VALUES ('a');
@@ -884,7 +886,9 @@ INSERT INTO t1 VALUES ('a');
CREATE TABLE t3 SELECT REPEAT(a,2) AS a FROM t1 UNION SELECT b FROM t2;
SHOW CREATE TABLE t3;
DROP TABLES t1,t2,t3;
-SET max_allowed_packet:= @tmp_max;
+--connection default
+SET @@global.max_allowed_packet:= @tmp_max;
+--disconnect newconn
#
# Bug #10032 Bug in parsing UNION with ORDER BY when one node does not use FROM