List:Commits« Previous MessageNext Message »
From:kroki Date:November 16 2006 12:19pm
Subject:bk commit into 5.0 tree (kroki:1.2304)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of tomash. When tomash 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-11-16 14:19:37+03:00, kroki@stripped +3 -0
  Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
  into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047
  MERGE: 1.2283.7.2

  mysql-test/r/func_str.result@stripped, 2006-11-16 14:19:31+03:00, kroki@stripped
+13 -13
    Manual merge.
    MERGE: 1.121.1.1

  mysql-test/t/func_str.test@stripped, 2006-11-16 14:19:31+03:00, kroki@stripped +14
-13
    Manual merge.
    MERGE: 1.94.1.1

  sql/item_strfunc.cc@stripped, 2006-11-16 14:16:44+03:00, kroki@stripped +0 -0
    Auto merged
    MERGE: 1.286.1.1

# 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:	kroki
# Host:	moonlight.intranet
# Root:	/home/tomash/src/mysql_ab/mysql-5.0-bug17047/RESYNC

--- 1.288/sql/item_strfunc.cc	2006-11-16 14:19:52 +03:00
+++ 1.289/sql/item_strfunc.cc	2006-11-16 14:19:52 +03:00
@@ -80,6 +80,20 @@ String *Item_str_func::check_well_formed
 }
 
 
+bool Item_str_func::fix_fields(THD *thd, Item **ref)
+{
+  bool res= Item_func::fix_fields(thd, ref);
+  /*
+    In Item_str_func::check_well_formed_result() we may set null_value
+    flag on the same condition as in test() below.
+  */
+  maybe_null= (maybe_null ||
+               test(thd->variables.sql_mode &
+                    (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)));
+  return res;
+}
+
+
 my_decimal *Item_str_func::val_decimal(my_decimal *decimal_value)
 {
   DBUG_ASSERT(fixed == 1);

--- 1.122/mysql-test/r/func_str.result	2006-11-16 14:19:52 +03:00
+++ 1.123/mysql-test/r/func_str.result	2006-11-16 14:19:52 +03:00
@@ -1903,4 +1903,17 @@ Warnings:
 Error	1292	Truncated incorrect DECIMAL value: ''
 Error	1292	Truncated incorrect DECIMAL value: ''
 Warning	1301	Result of lpad() was larger than max_allowed_packet (1048576) - truncated
+SET @orig_sql_mode = @@SQL_MODE;
+SET SQL_MODE=traditional;
+SELECT CHAR(0xff,0x8f USING utf8);
+CHAR(0xff,0x8f USING utf8)
+NULL
+Warnings:
+Error	1300	Invalid utf8 character string: 'FF8F'
+SELECT CHAR(0xff,0x8f USING utf8) IS NULL;
+CHAR(0xff,0x8f USING utf8) IS NULL
+1
+Warnings:
+Error	1300	Invalid utf8 character string: 'FF8F'
+SET SQL_MODE=@orig_sql_mode;
 End of 5.0 tests

--- 1.95/mysql-test/t/func_str.test	2006-11-16 14:19:52 +03:00
+++ 1.96/mysql-test/t/func_str.test	2006-11-16 14:19:52 +03:00
@@ -780,6 +780,7 @@ SELECT * FROM t1 INNER JOIN t2 ON code=i
 
 DROP TABLE t1,t2;
 
+
 #
 # Bug #10963
 # 4294967296 18446744073709551616
@@ -968,5 +969,19 @@ select lpad('hello', -184467440737095516
 select lpad('hello', 18446744073709551616, '1');
 select lpad('hello', -18446744073709551617, '1');
 select lpad('hello', 18446744073709551617, '1');
+
+
+#
+# BUG#17047: CHAR() and IN() can return NULL without signaling NULL
+# result
+#
+SET @orig_sql_mode = @@SQL_MODE;
+SET SQL_MODE=traditional;
+
+SELECT CHAR(0xff,0x8f USING utf8);
+SELECT CHAR(0xff,0x8f USING utf8) IS NULL;
+
+SET SQL_MODE=@orig_sql_mode;
+
 
 --echo End of 5.0 tests
Thread
bk commit into 5.0 tree (kroki:1.2304)kroki16 Nov