summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/t/query_prealloc_size_func.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/sys_vars/t/query_prealloc_size_func.test')
-rw-r--r--mysql-test/suite/sys_vars/t/query_prealloc_size_func.test64
1 files changed, 35 insertions, 29 deletions
diff --git a/mysql-test/suite/sys_vars/t/query_prealloc_size_func.test b/mysql-test/suite/sys_vars/t/query_prealloc_size_func.test
index 4f1e3e63e16..7267b9e317e 100644
--- a/mysql-test/suite/sys_vars/t/query_prealloc_size_func.test
+++ b/mysql-test/suite/sys_vars/t/query_prealloc_size_func.test
@@ -1,32 +1,32 @@
############# mysql-test\t\query_prealloc_size_func.test ######################
-# #
-# Variable Name: query_prealloc_size #
-# Scope: GLOBAL & SESSION #
-# Access Type: Dynamic #
-# Data Type: integer #
-# Default Value: 8192 #
-# Values: 8192-4294967295 #
-# #
-# #
-# Creation Date: 2008-02-22 #
-# Author: Sharique Abdullah #
-# #
-# Description: Test Cases of Dynamic System Variable "query_prealloc_size" #
-# that checks behavior of this variable in the following ways #
-# * Default Value #
-# * Valid & Invalid values #
-# * Scope & Access method #
-# * Cache behaviors #
-# #
-# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
-# server-system-variables.html#option_mysqld_query_prealloc_size #
-# #
+# #
+# Variable Name: query_prealloc_size #
+# Scope: GLOBAL & SESSION #
+# Access Type: Dynamic #
+# Data Type: integer #
+# Default Value: 8192 #
+# Values: 8192-4294967295 #
+# #
+# #
+# Creation Date: 2008-02-22 #
+# Author: Sharique Abdullah #
+# #
+# Description: Test Cases of Dynamic System Variable "query_prealloc_size" #
+# that checks behavior of this variable in the following ways #
+# * Default Value #
+# * Valid & Invalid values #
+# * Scope & Access method #
+# * Cache behaviors #
+# #
+# Reference: #
+# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
+# #
###############################################################################
--echo ** Setup **
---echo
+--echo
#
# Setup
#
@@ -35,16 +35,18 @@
# Save initial value
#
-CREATE TABLE t1 (id int auto_increment primary key, val text(200));
+SET @start_value = @@global.query_prealloc_size;
-INSERT INTO t1 values(NULL,'a');
-INSERT INTO t1 values(NULL,'b');
-INSERT INTO t1 values(NULL,'c');
-INSERT INTO t1 values(NULL,'d');
+CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY, val TEXT(200));
+
+INSERT INTO t1 VALUES(NULL,'a');
+INSERT INTO t1 VALUES(NULL,'b');
+INSERT INTO t1 VALUES(NULL,'c');
+INSERT INTO t1 VALUES(NULL,'d');
SELECT * FROM t1 ORDER BY val;
-SET SESSION query_prealloc_size = 8192;
+SET SESSION query_prealloc_size = 8192;
--echo '#----------------------------FN_DYNVARS_137_05-----------------#'
@@ -84,3 +86,7 @@ connection default;
disconnect con_int1;
disconnect con_int2;
+DROP TABLE t1;
+
+SET @@global.query_prealloc_size = @start_value;
+