List:Commits« Previous MessageNext Message »
From:kpettersson Date:September 22 2006 11:22am
Subject:bk commit into 5.0 tree (Kristofer.Pettersson:1.2539) BUG#21811
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of Kristofer Pettersson. When Kristofer Pettersson 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-22 11:22:01+02:00, Kristofer.Pettersson@naruto. +1 -0
  Bug#21811 Odd casting with date + INTERVAL arithmetic
  - The definition of the result type of a type_date function didn't
    include INTERVAL_WEEK
  - This patch adds an explicit test for INTERVAL_WEEK which results 
    in the result type for an item_date_add_intervall operation 
    being DATE rather than DATETIME when one parameter is
    INTERVAL_WEEK.

  sql/item_timefunc.cc@stripped, 2006-09-22 11:21:27+02:00, Kristofer.Pettersson@naruto. +1 -1
    Added explicit test for INTERVAL_WEEK to evaluate as MYSQL_TYPE_DATE

# 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:	Kristofer.Pettersson
# Host:	naruto.
# Root:	C:/cpp/bug21811/my41-bug21811

--- 1.106/sql/item_timefunc.cc	2006-09-22 11:22:14 +02:00
+++ 1.107/sql/item_timefunc.cc	2006-09-22 11:22:14 +02:00
@@ -1876,7 +1876,7 @@
     cached_field_type= MYSQL_TYPE_DATETIME;
   else if (arg0_field_type == MYSQL_TYPE_DATE)
   {
-    if (int_type <= INTERVAL_DAY || int_type == INTERVAL_YEAR_MONTH)
+    if (int_type <= INTERVAL_DAY || int_type == INTERVAL_YEAR_MONTH || int_type == INTERVAL_WEEK )
       cached_field_type= arg0_field_type;
     else
       cached_field_type= MYSQL_TYPE_DATETIME;


Thread
bk commit into 5.0 tree (Kristofer.Pettersson:1.2539) BUG#21811kpettersson22 Sep