List:Commits« Previous MessageNext Message »
From:Tatiana A. Nurnberg Date:June 2 2008 11:21am
Subject:bzr commit into mysql-5.1 branch (azundris:2659) Bug#36446
View as plain text  
#At file:///misc/mysql/forest/36446/51-36446/

 2659 Tatiana A. Nurnberg	2008-06-02
      Bug#36446: Attempt to set @@join_buffer_size to its minimum value produces spurious warning
      
      If a sys-var has a base and a block-size>1, and then a
      user-supplied value >= minimum ended up below minimum
      thanks to block-size alignment, we threw a warning.
      This meant for instance that when getting, then setting
      the minimum, we'd see a warning. This was needlessly
      confusing.
modified:
  mysql-test/r/key_cache.result
  mysql-test/r/read_buffer_size_basic.result
  mysql-test/r/read_rnd_buffer_size_basic.result
  mysql-test/r/variables.result
  mysql-test/t/variables.test
  mysys/my_getopt.c

per-file comments:
  mysql-test/r/key_cache.result
    spurious warning no longer thrown
  mysql-test/r/read_buffer_size_basic.result
    spurious warning no longer thrown
  mysql-test/r/read_rnd_buffer_size_basic.result
    spurious warning no longer thrown
  mysql-test/r/variables.result
    show that we will get no warning when setting variables
    with both a base and a block-size to their minimum value.
  mysql-test/t/variables.test
    show that we will get no warning when setting variables
    with both a base and a block-size to their minimum value.
  mysys/my_getopt.c
    If block-size alignment results in value below minimum,
    still use minimum, but only throw a warning if the value
    actually supplied by the user was below minimum.
=== modified file 'mysql-test/r/key_cache.result'
--- a/mysql-test/r/key_cache.result	2008-03-27 16:43:17 +0000
+++ b/mysql-test/r/key_cache.result	2008-06-02 11:21:41 +0000
@@ -276,8 +276,6 @@ Variable_name	Value
 Key_blocks_unused	KEY_BLOCKS_UNUSED
 set global keycache2.key_buffer_size=0;
 set global keycache3.key_buffer_size=100;
-Warnings:
-Warning	1292	Truncated incorrect key_buffer_size value: '100'
 set global keycache3.key_buffer_size=0;
 create table t1 (mytext text, FULLTEXT (mytext));
 insert t1 values ('aaabbb');

=== modified file 'mysql-test/r/read_buffer_size_basic.result'
--- a/mysql-test/r/read_buffer_size_basic.result	2008-04-10 13:14:28 +0000
+++ b/mysql-test/r/read_buffer_size_basic.result	2008-06-02 11:21:41 +0000
@@ -151,15 +151,11 @@ SELECT @@global.read_buffer_size= 8200 O
 'Bug: FN_DYNVARS_138_08- Errors are not coming on assigning TRUE/FALSE to variable'
 '#---------------------FN_DYNVARS_138_09----------------------#'
 SET @@global.read_buffer_size = 9000;
-Warnings:
-Warning	1292	Truncated incorrect read_buffer_size value: '9000'
 SELECT @@read_buffer_size = @@global.read_buffer_size;
 @@read_buffer_size = @@global.read_buffer_size
 0
 '#---------------------FN_DYNVARS_138_10----------------------#'
 SET @@read_buffer_size = 9000;
-Warnings:
-Warning	1292	Truncated incorrect read_buffer_size value: '9000'
 SELECT @@read_buffer_size = @@local.read_buffer_size;
 @@read_buffer_size = @@local.read_buffer_size
 1
@@ -168,8 +164,6 @@ SELECT @@local.read_buffer_size = @@sess
 1
 '#---------------------FN_DYNVARS_138_11----------------------#'
 SET read_buffer_size = 9100;
-Warnings:
-Warning	1292	Truncated incorrect read_buffer_size value: '9100'
 SELECT @@read_buffer_size= 8200 OR @@read_buffer_size= 8228 ;
 @@read_buffer_size= 8200 OR @@read_buffer_size= 8228
 1

=== modified file 'mysql-test/r/read_rnd_buffer_size_basic.result'
--- a/mysql-test/r/read_rnd_buffer_size_basic.result	2008-04-10 13:14:28 +0000
+++ b/mysql-test/r/read_rnd_buffer_size_basic.result	2008-06-02 11:21:41 +0000
@@ -150,15 +150,11 @@ SELECT @@global.read_rnd_buffer_size= 82
 1
 '#---------------------FN_DYNVARS_140_09----------------------#'
 SET @@global.read_rnd_buffer_size = 9000;
-Warnings:
-Warning	1292	Truncated incorrect read_rnd_buffer_size value: '9000'
 SELECT @@read_rnd_buffer_size = @@global.read_rnd_buffer_size;
 @@read_rnd_buffer_size = @@global.read_rnd_buffer_size
 0
 '#---------------------FN_DYNVARS_140_10----------------------#'
 SET @@read_rnd_buffer_size = 9000;
-Warnings:
-Warning	1292	Truncated incorrect read_rnd_buffer_size value: '9000'
 SELECT @@read_rnd_buffer_size = @@local.read_rnd_buffer_size;
 @@read_rnd_buffer_size = @@local.read_rnd_buffer_size
 1
@@ -167,8 +163,6 @@ SELECT @@local.read_rnd_buffer_size = @@
 1
 '#---------------------FN_DYNVARS_140_11----------------------#'
 SET read_rnd_buffer_size = 9100;
-Warnings:
-Warning	1292	Truncated incorrect read_rnd_buffer_size value: '9100'
 SELECT @@read_rnd_buffer_size= 8200 OR @@read_rnd_buffer_size= 8228;
 @@read_rnd_buffer_size= 8200 OR @@read_rnd_buffer_size= 8228
 1

=== modified file 'mysql-test/r/variables.result'
--- a/mysql-test/r/variables.result	2008-03-28 15:10:04 +0000
+++ b/mysql-test/r/variables.result	2008-06-02 11:21:41 +0000
@@ -25,6 +25,7 @@ set @my_server_id                 =@@glo
 set @my_slow_launch_time          =@@global.slow_launch_time;
 set @my_storage_engine            =@@global.storage_engine;
 set @my_thread_cache_size         =@@global.thread_cache_size;
+set @my_join_buffer_size          =@@global.join_buffer_size;
 set @`test`=1;
 select @test, @`test`, @TEST, @`TEST`, @"teSt";
 @test	@`test`	@TEST	@`TEST`	@"teSt"
@@ -981,6 +982,11 @@ show variables like 'hostname';
 Variable_name	Value
 hostname	#
 End of 5.0 tests
+set join_buffer_size=1;
+Warnings:
+Warning	1292	Truncated incorrect join_buffer_size value: '1'
+set @save_join_buffer_size=@@join_buffer_size;
+set join_buffer_size=@save_join_buffer_size;
 set global binlog_cache_size         =@my_binlog_cache_size;
 set global connect_timeout           =@my_connect_timeout;
 set global delayed_insert_timeout    =@my_delayed_insert_timeout;
@@ -1009,6 +1015,7 @@ set global server_id                 =@m
 set global slow_launch_time          =@my_slow_launch_time;
 set global storage_engine            =@my_storage_engine;
 set global thread_cache_size         =@my_thread_cache_size;
+set global join_buffer_size          =@my_join_buffer_size;
 show global variables where Variable_name='table_definition_cache' or
 Variable_name='table_lock_wait_timeout';
 Variable_name	Value

=== modified file 'mysql-test/t/variables.test'
--- a/mysql-test/t/variables.test	2008-03-28 15:10:04 +0000
+++ b/mysql-test/t/variables.test	2008-06-02 11:21:41 +0000
@@ -34,6 +34,7 @@ set @my_server_id                 =@@glo
 set @my_slow_launch_time          =@@global.slow_launch_time;
 set @my_storage_engine            =@@global.storage_engine;
 set @my_thread_cache_size         =@@global.thread_cache_size;
+set @my_join_buffer_size          =@@global.join_buffer_size;
 
 # case insensitivity tests (new in 5.0)
 set @`test`=1;
@@ -737,6 +738,18 @@ show variables like 'hostname';
 
 --echo End of 5.0 tests
 
+#
+# Bug#36446: Attempt to set @@join_buffer_size to its minimum value
+#            produces spurious warning
+#
+
+# set to 1 so mysqld will correct to minimum (+ warn)
+set join_buffer_size=1;
+# save minimum
+set @save_join_buffer_size=@@join_buffer_size;
+# set minimum
+set join_buffer_size=@save_join_buffer_size;
+
 # This is at the very after the versioned tests, since it involves doing
 # cleanup
 #
@@ -771,6 +784,7 @@ set global server_id                 =@m
 set global slow_launch_time          =@my_slow_launch_time;
 set global storage_engine            =@my_storage_engine;
 set global thread_cache_size         =@my_thread_cache_size;
+set global join_buffer_size          =@my_join_buffer_size;
 
 #
 # Bug#28580 Repeatation of status variables
@@ -794,4 +808,3 @@ SET GLOBAL log_output = 0;
 
 --echo
 --echo # -- End of Bug#34820.
-

=== modified file 'mysys/my_getopt.c'
--- a/mysys/my_getopt.c	2008-02-18 22:29:39 +0000
+++ b/mysys/my_getopt.c	2008-06-02 11:21:41 +0000
@@ -837,7 +837,8 @@ longlong getopt_ll_limit_value(longlong
   if (num < optp->min_value)
   {
     num= optp->min_value;
-    adjusted= TRUE;
+    if (old < optp->min_value)
+      adjusted= TRUE;
   }
 
   if (fix)
@@ -908,7 +909,8 @@ ulonglong getopt_ull_limit_value(ulonglo
   if (num < (ulonglong) optp->min_value)
   {
     num= (ulonglong) optp->min_value;
-    adjusted= TRUE;
+    if (old < optp->min_value)
+      adjusted= TRUE;
   }
 
   if (fix)

Thread
bzr commit into mysql-5.1 branch (azundris:2659) Bug#36446Tatiana A. Nurnberg2 Jun