MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:holyfoot Date:December 6 2006 7:06am
Subject:bk commit into 5.0 tree (holyfoot:1.2325)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of hf. When hf 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-12-06 11:06:13+04:00, holyfoot@stripped +3 -0
  Merge mysql.com:/home/hf/work/16546/my41-16546
  into  mysql.com:/home/hf/work/16546/my50-16546
  MERGE: 1.1616.2843.20

  mysql-test/r/type_datetime.result@stripped, 2006-12-06 11:05:16+04:00, holyfoot@stripped +0 -0
    SCCS merged
    MERGE: 1.21.1.5

  mysql-test/t/type_datetime.test@stripped, 2006-12-06 11:04:36+04:00, holyfoot@stripped +0 -0
    Auto merged
    MERGE: 1.18.1.1

  sql/item_timefunc.h@stripped, 2006-12-06 11:06:05+04:00, holyfoot@stripped +0 -1
    merging
    MERGE: 1.42.1.17

# 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:	holyfoot
# Host:	deer.(none)
# Root:	/home/hf/work/16546/my50-16546/RESYNC

--- 1.70/sql/item_timefunc.h	2006-12-06 11:06:19 +04:00
+++ 1.71/sql/item_timefunc.h	2006-12-06 11:06:19 +04:00
@@ -848,6 +848,11 @@ public:
   String *val_str(String *str);
   const char *cast_type() const { return "datetime"; }
   enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; }
+  void fix_length_and_dec()
+  {
+    Item_typecast_maybe_null::fix_length_and_dec();
+    decimals= DATETIME_DEC;
+  }
   Field *tmp_table_field(TABLE *t_arg)
   {
     return (new Field_datetime(maybe_null, name, t_arg, &my_charset_bin));

--- 1.33/mysql-test/r/type_datetime.result	2006-12-06 11:06:19 +04:00
+++ 1.34/mysql-test/r/type_datetime.result	2006-12-06 11:06:19 +04:00
@@ -168,6 +168,9 @@ dt
 0000-00-00 00:00:00
 0000-00-00 00:00:00
 drop table t1;
+select cast('2006-12-05 22:10:10' as datetime) + 0;
+cast('2006-12-05 22:10:10' as datetime) + 0
+20061205221010.000000
 CREATE TABLE t1(a DATETIME NOT NULL);
 INSERT INTO t1 VALUES ('20060606155555');
 SELECT a FROM t1 WHERE a=(SELECT MAX(a) FROM t1) AND (a="20060606155555");

--- 1.20/mysql-test/t/type_datetime.test	2006-12-06 11:06:19 +04:00
+++ 1.21/mysql-test/t/type_datetime.test	2006-12-06 11:06:19 +04:00
@@ -113,6 +113,9 @@ insert into t1 values ("00-00-00"), ("00
 select * from t1;
 drop table t1;
 
+# Bug #16546 DATETIME+0 not always coerced the same way 
+select cast('2006-12-05 22:10:10' as datetime) + 0;
+
 # End of 4.1 tests
 
 #
Thread
bk commit into 5.0 tree (holyfoot:1.2325)holyfoot6 Dec