summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars
diff options
context:
space:
mode:
authorDmitry Shulga <Dmitry.Shulga@oracle.com>2011-03-15 18:57:36 +0600
committerDmitry Shulga <Dmitry.Shulga@oracle.com>2011-03-15 18:57:36 +0600
commit10f5982ee546f41df56dbf2f2933e29cc493db2b (patch)
tree0f5b82b368f0393b2467be245564bcd49d0933f9 /mysql-test/suite/sys_vars
parent14df359b396b5eb3253826b4e81af7c41125e039 (diff)
parent6c2f5e306ca3fa621cd25cedd49181d6e0d5cbc6 (diff)
downloadmariadb-git-10f5982ee546f41df56dbf2f2933e29cc493db2b.tar.gz
Manual merge from mysql-5.1 for Bug#11764168 (56976: Severe denial
of service in prepared statements).
Diffstat (limited to 'mysql-test/suite/sys_vars')
-rw-r--r--mysql-test/suite/sys_vars/r/max_long_data_size_basic.result14
-rw-r--r--mysql-test/suite/sys_vars/t/max_long_data_size_basic.test17
2 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/suite/sys_vars/r/max_long_data_size_basic.result b/mysql-test/suite/sys_vars/r/max_long_data_size_basic.result
new file mode 100644
index 00000000000..679a0d3611f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/max_long_data_size_basic.result
@@ -0,0 +1,14 @@
+select @@global.max_long_data_size=20;
+@@global.max_long_data_size=20
+0
+select @@session.max_long_data_size;
+ERROR HY000: Variable 'max_long_data_size' is a GLOBAL variable
+SELECT @@global.max_long_data_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='max_long_data_size';
+@@global.max_long_data_size = VARIABLE_VALUE
+1
+set global max_long_data_size=1;
+ERROR HY000: Variable 'max_long_data_size' is a read only variable
+set session max_long_data_size=1;
+ERROR HY000: Variable 'max_long_data_size' is a read only variable
diff --git a/mysql-test/suite/sys_vars/t/max_long_data_size_basic.test b/mysql-test/suite/sys_vars/t/max_long_data_size_basic.test
new file mode 100644
index 00000000000..eefa61bd4b7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/max_long_data_size_basic.test
@@ -0,0 +1,17 @@
+select @@global.max_long_data_size=20;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.max_long_data_size;
+
+# Show that value of the variable matches the value in the GLOBAL I_S table
+SELECT @@global.max_long_data_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='max_long_data_size';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global max_long_data_size=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session max_long_data_size=1;
+