List:Commits« Previous MessageNext Message »
From:Alexey Kopytov Date:September 12 2006 12:25pm
Subject:bk commit into 4.1 tree (kaa:1.2541) BUG#20924
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of kaa. When kaa does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-09-12 16:25:40+04:00, kaa@stripped +11 -0
  Post-review fixes for bug #20924

  mysql-test/r/case.result@stripped, 2006-09-12 16:25:38+04:00, kaa@stripped +1 -0
    Post-review fix for bug #20924

  mysql-test/r/func_if.result@stripped, 2006-09-12 16:25:38+04:00, kaa@stripped +1 -0
    Post-review fix for bug #20924

  mysql-test/r/func_test.result@stripped, 2006-09-12 16:25:38+04:00, kaa@stripped +1 -0
    Post-review fix for bug #20924

  mysql-test/r/user_var.result@stripped, 2006-09-12 16:25:38+04:00, kaa@stripped +1 -0
    Post-review fix for bug #20924

  mysql-test/t/case.test@stripped, 2006-09-12 16:25:38+04:00, kaa@stripped +4 -2
    Post-review fix for bug #20924

  mysql-test/t/func_if.test@stripped, 2006-09-12 16:25:38+04:00, kaa@stripped +7 -3
    Post-review fix for bug #20924

  mysql-test/t/func_test.test@stripped, 2006-09-12 16:25:38+04:00, kaa@stripped +4 -2
    Post-review fix for bug #20924

  mysql-test/t/user_var.test@stripped, 2006-09-12 16:25:38+04:00, kaa@stripped +4 -2
    Post-review fix for bug #20924

  sql/item_func.cc@stripped, 2006-09-12 16:25:38+04:00, kaa@stripped +6 -7
    Post-review fix for bug #20924

  sql/item_func.h@stripped, 2006-09-12 16:25:38+04:00, kaa@stripped +1 -1
    Post-review fix for bug #20924

  sql/log_event.cc@stripped, 2006-09-12 16:25:38+04:00, kaa@stripped +1 -1
    Post-review fix for bug #20924

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	kaa
# Host:	polly.local
# Root:	/tmp/20924/bug20294/my41-bug20294

--- 1.263/sql/item_func.cc	2006-09-12 16:25:44 +04:00
+++ 1.264/sql/item_func.cc	2006-09-12 16:25:44 +04:00
@@ -1252,8 +1252,7 @@ longlong Item_func_min_max::val_int()
     {
       if (args[i]->null_value)
         continue;
-      if (unsigned_flag && arg_unsigned_flag ||
-          (!unsigned_flag && !arg_unsigned_flag))
+      if (unsigned_flag == arg_unsigned_flag)
         cmp= tmp < value;
       else if (unsigned_flag)
         cmp= compare_int_signed_unsigned(tmp, value) < 0;
@@ -2614,26 +2613,26 @@ Item_func_set_user_var::update()
   case REAL_RESULT:
   {
     res= update_hash((void*) &save_result.vreal,sizeof(save_result.vreal),
-		     REAL_RESULT, &my_charset_bin, DERIVATION_IMPLICIT);
+		     REAL_RESULT, &my_charset_bin, DERIVATION_IMPLICIT, 0);
     break;
   }
   case INT_RESULT:
   {
     res= update_hash((void*) &save_result.vint, sizeof(save_result.vint),
-         INT_RESULT, &my_charset_bin, DERIVATION_IMPLICIT,
-         unsigned_flag);
+                     INT_RESULT, &my_charset_bin, DERIVATION_IMPLICIT,
+                     unsigned_flag);
     break;
   }
   case STRING_RESULT:
   {
     if (!save_result.vstr)					// Null value
       res= update_hash((void*) 0, 0, STRING_RESULT, &my_charset_bin,
-		       DERIVATION_IMPLICIT);
+		       DERIVATION_IMPLICIT, 0);
     else
       res= update_hash((void*) save_result.vstr->ptr(),
 		       save_result.vstr->length(), STRING_RESULT,
 		       save_result.vstr->charset(),
-		       DERIVATION_IMPLICIT);
+		       DERIVATION_IMPLICIT, 0);
     break;
   }
   case ROW_RESULT:

--- 1.131/sql/item_func.h	2006-09-12 16:25:44 +04:00
+++ 1.132/sql/item_func.h	2006-09-12 16:25:44 +04:00
@@ -962,7 +962,7 @@ public:
   longlong val_int();
   String *val_str(String *str);
   bool update_hash(void *ptr, uint length, enum Item_result type, 
-  		   CHARSET_INFO *cs, Derivation dv, bool unsigned_arg= 0);
+  		   CHARSET_INFO *cs, Derivation dv, bool unsigned_arg);
   bool check();
   bool update();
   enum Item_result result_type () const { return cached_result_type; }

--- 1.188/sql/log_event.cc	2006-09-12 16:25:44 +04:00
+++ 1.189/sql/log_event.cc	2006-09-12 16:25:44 +04:00
@@ -2607,7 +2607,7 @@ int User_var_log_event::exec_event(struc
     a single record and with a single column. Thus, like
     a column value, it could always have IMPLICIT derivation.
    */
-  e.update_hash(val, val_len, type, charset, DERIVATION_IMPLICIT);
+  e.update_hash(val, val_len, type, charset, DERIVATION_IMPLICIT, 0);
   free_root(thd->mem_root,0);
 
   rli->inc_event_relay_log_pos(get_event_len());

--- 1.18/mysql-test/r/case.result	2006-09-12 16:25:44 +04:00
+++ 1.19/mysql-test/r/case.result	2006-09-12 16:25:44 +04:00
@@ -183,3 +183,4 @@ CASE 1 WHEN 1 THEN 18446744073709551615 
 SELECT COALESCE(18446744073709551615);
 COALESCE(18446744073709551615)
 18446744073709551615
+End of 4.1 tests

--- 1.26/mysql-test/r/func_test.result	2006-09-12 16:25:44 +04:00
+++ 1.27/mysql-test/r/func_test.result	2006-09-12 16:25:44 +04:00
@@ -189,3 +189,4 @@ GREATEST(1, 18446744073709551615)
 SELECT LEAST(1, 18446744073709551615);
 LEAST(1, 18446744073709551615)
 1
+End of 4.1 tests

--- 1.18/mysql-test/t/case.test	2006-09-12 16:25:44 +04:00
+++ 1.19/mysql-test/t/case.test	2006-09-12 16:25:44 +04:00
@@ -131,9 +131,11 @@ from t1 where b=3 group by b;
 drop table t1;
 
 #
-# Bug #20924: UNSIGNED values in CASE and COALESCE are treated as SIGNED
+# Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various
+# functions
+# - UNSIGNED values in CASE and COALESCE are treated as SIGNED
 #
 SELECT CASE 1 WHEN 1 THEN 18446744073709551615 ELSE 1 END;
 SELECT COALESCE(18446744073709551615);
 
-# End of 4.1 tests
+--echo End of 4.1 tests

--- 1.24/mysql-test/t/func_test.test	2006-09-12 16:25:44 +04:00
+++ 1.25/mysql-test/t/func_test.test	2006-09-12 16:25:44 +04:00
@@ -109,9 +109,11 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3
 select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3;
 
 #
-# Bug #20924: UNSIGNED values in GREATEST() and LEAST() are treated as SIGNED
+# Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various
+# functions
+# - UNSIGNED values in GREATEST() and LEAST() are treated as SIGNED
 #
 SELECT GREATEST(1, 18446744073709551615);
 SELECT LEAST(1, 18446744073709551615);
 
-# End of 4.1 tests
+--echo End of 4.1 tests

--- 1.16/mysql-test/r/func_if.result	2006-09-12 16:25:44 +04:00
+++ 1.17/mysql-test/r/func_if.result	2006-09-12 16:25:44 +04:00
@@ -105,3 +105,4 @@ IF(1 != 0, 18446744073709551615, 1)
 SELECT IFNULL(NULL, 18446744073709551615);
 IFNULL(NULL, 18446744073709551615)
 18446744073709551615
+End of 4.1 tests

--- 1.16/mysql-test/t/func_if.test	2006-09-12 16:25:44 +04:00
+++ 1.17/mysql-test/t/func_if.test	2006-09-12 16:25:44 +04:00
@@ -74,13 +74,17 @@ SELECT a, NULLIF(a,'') FROM t1 WHERE NUL
 DROP TABLE t1;
 
 #
-# Bug #20924: UNSIGNED values in IF() are treated as SIGNED
+# Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various
+# functions
+# - UNSIGNED values in IF() are treated as SIGNED
 #
 SELECT IF(1 != 0, 18446744073709551615, 1);
 
 #
-# Bug #20924: UNSIGNED values in IFNULL() are treated as SIGNED
+# Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various
+# functions
+# - UNSIGNED values in IFNULL() are treated as SIGNED
 #
 SELECT IFNULL(NULL, 18446744073709551615);
 
-# End of 4.1 tests
+--echo End of 4.1 tests

--- 1.29/mysql-test/r/user_var.result	2006-09-12 16:25:44 +04:00
+++ 1.30/mysql-test/r/user_var.result	2006-09-12 16:25:44 +04:00
@@ -207,3 +207,4 @@ set @a=18446744073709551615;
 select @a;
 @a
 18446744073709551615
+End of 4.1 tests

--- 1.23/mysql-test/t/user_var.test	2006-09-12 16:25:44 +04:00
+++ 1.24/mysql-test/t/user_var.test	2006-09-12 16:25:44 +04:00
@@ -142,9 +142,11 @@ select @@global.version;
 select @@session.VERSION;
 
 #
-# Bug #20924 SET on a user variable saves UNSIGNED as SIGNED
+# Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various
+# functions
+# - SET on a user variable saves UNSIGNED as SIGNED
 #
 set @a=18446744073709551615;
 select @a;
 
-# End of 4.1 tests
+--echo End of 4.1 tests
Thread
bk commit into 4.1 tree (kaa:1.2541) BUG#20924Alexey Kopytov12 Sep