List:Commits« Previous MessageNext Message »
From:ramil Date:February 6 2007 10:57am
Subject:bk commit into 5.0 tree (ramil:1.2299)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram 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, 2007-02-06 13:57:20+04:00, ramil@stripped +3 -0
  Merge mysql.com:/usr/home/ram/work/bug23938/my41-bug23938
  into  mysql.com:/usr/home/ram/work/bug23938/my50-bug23938
  MERGE: 1.1616.2144.203

  mysql-test/r/cast.result@stripped, 2007-02-06 13:57:15+04:00, ramil@stripped +0 -0
    SCCS merged
    MERGE: 1.20.1.9

  mysql-test/t/cast.test@stripped, 2007-02-06 13:57:15+04:00, ramil@stripped +0 -0
    SCCS merged
    MERGE: 1.15.1.8

  sql/item_timefunc.cc@stripped, 2007-02-06 13:53:34+04:00, ramil@stripped +0 -0
    Auto merged
    MERGE: 1.51.6.6

# 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:	ramil
# Host:	myoffice.izhnet.ru
# Root:	/usr/home/ram/work/bug23938/my50-bug23938/RESYNC

--- 1.130/sql/item_timefunc.cc	2007-02-06 13:57:27 +04:00
+++ 1.131/sql/item_timefunc.cc	2007-02-06 13:57:27 +04:00
@@ -2667,7 +2667,10 @@ longlong Item_date_typecast::val_int()
   DBUG_ASSERT(fixed == 1);
   TIME ltime;
   if (args[0]->get_date(&ltime, TIME_FUZZY_DATE))
+  {
+    null_value= 1;
     return 0;
+  }
   return (longlong) (ltime.year * 10000L + ltime.month * 100 + ltime.day);
 }
 

--- 1.47/mysql-test/r/cast.result	2007-02-06 13:57:27 +04:00
+++ 1.48/mysql-test/r/cast.result	2007-02-06 13:57:27 +04:00
@@ -348,6 +348,10 @@ Warnings:
 Warning	1292	Truncated incorrect INTEGER value: '-1e+30'
 Warning	1292	Truncated incorrect INTEGER value: '1e+30'
 DROP TABLE t1;
+select isnull(date(NULL)), isnull(cast(NULL as DATE));
+isnull(date(NULL))	isnull(cast(NULL as DATE))
+1	1
+End of 4.1 tests
 select cast('1.2' as decimal(3,2));
 cast('1.2' as decimal(3,2))
 1.20

--- 1.33/mysql-test/t/cast.test	2007-02-06 13:57:27 +04:00
+++ 1.34/mysql-test/t/cast.test	2007-02-06 13:57:27 +04:00
@@ -176,7 +176,13 @@ INSERT INTO t1 SET f1 = +1.0e+30 ;
 SELECT f1 AS double_val, CAST(f1 AS SIGNED INT) AS cast_val FROM t1;
 DROP TABLE t1;					   
 
-# End of 4.1 tests
+#
+# Bug #23938: cast(NULL as DATE)
+#
+
+select isnull(date(NULL)), isnull(cast(NULL as DATE));
+
+--echo End of 4.1 tests
 
 
 #decimal-related additions
Thread
bk commit into 5.0 tree (ramil:1.2299)ramil6 Feb