List:Commits« Previous MessageNext Message »
From:Tatiana A. Nurnberg Date:March 16 2009 3:11pm
Subject:bzr commit into mysql-5.1-bugteam branch (azundris:2835) Bug#36446
View as plain text  
#At file:///home/tnurnberg/forest/36446/51-36446/ based on revid:azundris@stripped

 2835 Tatiana A. Nurnberg	2009-03-16
      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. (updated patch)

    modified:
      mysql-test/r/variables.result
      mysql-test/t/variables.test
      mysys/my_getopt.c
=== modified file 'mysql-test/r/variables.result'
--- a/mysql-test/r/variables.result	2009-03-12 16:55:10 +0000
+++ b/mysql-test/r/variables.result	2009-03-16 15:11:45 +0000
@@ -27,6 +27,7 @@ set @my_slow_launch_time          =@@glo
 set @my_storage_engine            =@@global.storage_engine;
 set @my_thread_cache_size         =@@global.thread_cache_size;
 set @my_max_allowed_packet        =@@global.max_allowed_packet;
+set @my_join_buffer_size          =@@global.join_buffer_size;
 set @`test`=1;
 select @test, @`test`, @TEST, @`TEST`, @"teSt";
 @test	@`test`	@TEST	@`TEST`	@"teSt"
@@ -1018,6 +1019,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;
@@ -1048,6 +1054,7 @@ set global slow_launch_time          =@m
 set global storage_engine            =@my_storage_engine;
 set global thread_cache_size         =@my_thread_cache_size;
 set global max_allowed_packet        =@my_max_allowed_packet;
+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	2009-03-12 16:55:10 +0000
+++ b/mysql-test/t/variables.test	2009-03-16 15:11:45 +0000
@@ -36,6 +36,7 @@ set @my_slow_launch_time          =@@glo
 set @my_storage_engine            =@@global.storage_engine;
 set @my_thread_cache_size         =@@global.thread_cache_size;
 set @my_max_allowed_packet        =@@global.max_allowed_packet;
+set @my_join_buffer_size          =@@global.join_buffer_size;
 # case insensitivity tests (new in 5.0)
 set @`test`=1;
 select @test, @`test`, @TEST, @`TEST`, @"teSt";
@@ -780,6 +781,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
 #
@@ -816,6 +829,8 @@ set global slow_launch_time          =@m
 set global storage_engine            =@my_storage_engine;
 set global thread_cache_size         =@my_thread_cache_size;
 set global max_allowed_packet        =@my_max_allowed_packet;
+set global join_buffer_size          =@my_join_buffer_size;
+
 #
 # Bug#28580 Repeatation of status variables
 #

=== modified file 'mysys/my_getopt.c'
--- a/mysys/my_getopt.c	2009-02-24 11:29:49 +0000
+++ b/mysys/my_getopt.c	2009-03-16 15:11:45 +0000
@@ -846,7 +846,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)
@@ -917,7 +918,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)


Attachment: [text/bzr-bundle] bzr/azundris@mysql.com-20090316151145-02w54fu0k8alwxvy.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (azundris:2835) Bug#36446Tatiana A. Nurnberg16 Mar