From 120e80f1d9d182fa0a7c52b27b1f4a9d4ffa4760 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Jul 2005 18:22:49 -0700 Subject: Fix for handling of unsigned long options on 32-bit platforms that allowed unintended overflows. (Bug #10351) mysql-test/r/select_safe.result: Update results mysql-test/r/variables.result: Update results mysql-test/t/select_safe.test: Remove "SELECT @@MAX_SEEKS_FOR_KEY;" because it depends on size of unsigned long of the system. mysql-test/t/variables.test: Fix test for #10351 to test the actual problem sql/mysqld.cc: Undo unnecessary change to default and max of max_seeks_for_key sql/set_var.cc: On platforms where SIZEOF_LONG != SIZEOF_LONGLONG, make sure to handle max values for ulong-sized options correctly. --- mysql-test/t/select_safe.test | 1 - mysql-test/t/variables.test | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'mysql-test/t') diff --git a/mysql-test/t/select_safe.test b/mysql-test/t/select_safe.test index 5b2dfb00bb7..7515ff40ab9 100644 --- a/mysql-test/t/select_safe.test +++ b/mysql-test/t/select_safe.test @@ -56,7 +56,6 @@ SELECT * from t1; # # Test MAX_SEEKS_FOR_KEY # -SELECT @@MAX_SEEKS_FOR_KEY; analyze table t1; insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"); explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index e6efb86e325..e32a6209a2d 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -408,11 +408,9 @@ set @@warning_count=1; set @@global.error_count=1; # -# Bug #10351: Setting max_heap_table_size to 4G fails +# Bug #10351: Setting ulong variable to > MAX_ULONG fails on 32-bit platform # set @@max_heap_table_size= 4294967296; -select @@max_heap_table_size; +select @@max_heap_table_size > 0; set global max_heap_table_size= 4294967296; -select @@max_heap_table_size; -set @@max_heap_table_size= 4294967296; -select @@max_heap_table_size; +select @@global.max_heap_table_size > 0; -- cgit v1.2.1