List:Commits« Previous MessageNext Message »
From:kpettersson Date:October 11 2006 9:06am
Subject:bk commit into 5.1 tree (Kristofer.Pettersson:1.2360)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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-10-11 11:05:55+02:00, Kristofer.Pettersson@naruto. +3 -0
  Merge naruto.:C:/cpp/bug21811/my51-bug21811
  into  naruto.:C:/cpp/mysql-5.1-new-maint
  MERGE: 1.2300.71.2

  include/my_time.h@stripped, 2006-10-11 11:05:49+02:00, Kristofer.Pettersson@naruto. +0 -0
    Auto merged
    MERGE: 1.14.1.1

  mysql-test/r/func_time.result@stripped, 2006-10-11 11:05:49+02:00, Kristofer.Pettersson@naruto. +0 -0
    Auto merged
    MERGE: 1.75.1.1

  sql/item_timefunc.cc@stripped, 2006-10-11 11:05:49+02:00, Kristofer.Pettersson@naruto. +0 -0
    Auto merged
    MERGE: 1.134.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:	Kristofer.Pettersson
# Host:	naruto.
# Root:	C:/cpp/mysql-5.1-new-maint/RESYNC

--- 1.136/sql/item_timefunc.cc	2006-10-11 11:06:13 +02:00
+++ 1.137/sql/item_timefunc.cc	2006-10-11 11:06:13 +02:00
@@ -2030,11 +2030,15 @@
           (date_sub_interval == other->date_sub_interval));
 }
 
+/*
+   'interval_names' reflects the order of the enumeration interval_type.
+   See item_timefunc.h
+ */
 
 static const char *interval_names[]=
 {
-  "year", "quarter", "month", "day", "hour",
-  "minute", "week", "second", "microsecond",
+  "year", "quarter", "month", "week", "day",  
+  "hour", "minute", "second", "microsecond",
   "year_month", "day_hour", "day_minute", 
   "day_second", "hour_minute", "hour_second",
   "minute_second", "day_microsecond",

--- 1.15/include/my_time.h	2006-10-11 11:06:13 +02:00
+++ 1.16/include/my_time.h	2006-10-11 11:06:13 +02:00
@@ -97,15 +97,25 @@
 int my_datetime_to_str(const MYSQL_TIME *l_time, char *to);
 int my_TIME_to_str(const MYSQL_TIME *l_time, char *to);
 
-/*
-  The following must be sorted so that simple intervals comes first.
-  (get_interval_value() depends on this)
+/* 
+  Available interval types used in any statement.
+
+  'interval_type' must be sorted so that simple intervals comes first,
+  ie year, quarter, month, week, day, hour, etc. The order based on
+  interval size is also important and the intervals should be kept in a
+  large to smaller order. (get_interval_value() depends on this)
+ 
+  Note: If you change the order of elements in this enum you should fix 
+  order of elements in 'interval_type_to_name' and 'interval_names' 
+  arrays 
+  
+  See also interval_type_to_name, get_interval_value, interval_names
 */
 
 enum interval_type
 {
-  INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_DAY, INTERVAL_HOUR,
-  INTERVAL_MINUTE, INTERVAL_WEEK, INTERVAL_SECOND, INTERVAL_MICROSECOND ,
+  INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_WEEK, INTERVAL_DAY,
+  INTERVAL_HOUR, INTERVAL_MINUTE, INTERVAL_SECOND, INTERVAL_MICROSECOND,
   INTERVAL_YEAR_MONTH, INTERVAL_DAY_HOUR, INTERVAL_DAY_MINUTE,
   INTERVAL_DAY_SECOND, INTERVAL_HOUR_MINUTE, INTERVAL_HOUR_SECOND,
   INTERVAL_MINUTE_SECOND, INTERVAL_DAY_MICROSECOND, INTERVAL_HOUR_MICROSECOND,

--- 1.80/mysql-test/r/func_time.result	2006-10-11 11:06:14 +02:00
+++ 1.81/mysql-test/r/func_time.result	2006-10-11 11:06:14 +02:00
@@ -612,7 +612,7 @@
 2003-01-03 01:01:01
 select date_add(date,INTERVAL "1" WEEK) from t1;
 date_add(date,INTERVAL "1" WEEK)
-2003-01-09 00:00:00
+2003-01-09
 select date_add(date,INTERVAL "1" QUARTER) from t1;
 date_add(date,INTERVAL "1" QUARTER)
 2003-04-02
@@ -621,7 +621,7 @@
 2003-01-02 00:01:00
 select timestampadd(WEEK, 1, date) from t1;
 timestampadd(WEEK, 1, date)
-2003-01-09 00:00:00
+2003-01-09
 select timestampadd(SQL_TSI_SECOND, 1, date) from t1;
 timestampadd(SQL_TSI_SECOND, 1, date)
 2003-01-02 00:00:01


Thread
bk commit into 5.1 tree (Kristofer.Pettersson:1.2360)kpettersson11 Oct