List:Commits« Previous MessageNext Message »
From:monty Date:March 26 2007 10:45am
Subject:bk commit into 5.1 tree (monty:1.2506)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of monty. When monty 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-03-26 13:44:58+03:00, monty@stripped +1 -0
  Fixed error found by valgrind in numerical date handling
  Fixed comments to say MYSQL_TIME instead of old typedef TIME

  sql-common/my_time.c@stripped, 2007-03-26 13:44:56+03:00, monty@stripped +12 -11
    Fixed error found by valgrind in numerical date handling
    Fixed comments to say MYSQL_TIME instead of old typedef TIME

# 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:	monty
# Host:	narttu.mysql.fi
# Root:	/home/my/mysql-5.1

--- 1.43/sql-common/my_time.c	2007-03-23 22:08:29 +02:00
+++ 1.44/sql-common/my_time.c	2007-03-26 13:44:56 +03:00
@@ -456,7 +456,7 @@
 
 
 /*
- Convert a time string to a TIME struct.
+ Convert a time string to a MYSQL_TIME struct.
 
   SYNOPSIS
    str_to_time()
@@ -642,11 +642,11 @@
   l_time->second_part=  date[4];
   l_time->time_type= MYSQL_TIMESTAMP_TIME;
 
-  /* Check if the value is valid and fits into TIME range */
+  /* Check if the value is valid and fits into MYSQL_TIME range */
   if (check_time_range(l_time, warning))
     return 1;
   
-  /* Check if there is garbage at end of the TIME specification */
+  /* Check if there is garbage at end of the MYSQL_TIME specification */
   if (str != end)
   {
     do
@@ -663,11 +663,11 @@
 
 
 /*
-  Check 'time' value to lie in the TIME range
+  Check 'time' value to lie in the MYSQL_TIME range
 
   SYNOPSIS:
     check_time_range()
-    time     pointer to TIME value
+    time     pointer to MYSQL_TIME value
     warning  set MYSQL_TIME_WARN_OUT_OF_RANGE flag if the value is out of range
 
   DESCRIPTION
@@ -1008,7 +1008,7 @@
 /*
   Functions to convert time/date/datetime value to a string,
   using default format.
-  This functions don't check that given TIME structure members are
+  This functions don't check that given MYSQL_TIME structure members are
   in valid range. If they are not, return value won't reflect any
   valid date either. Additionally, make_time doesn't take into
   account time->day member: it's assumed that days have been converted
@@ -1094,7 +1094,7 @@
 
   DESCRIPTION
     Convert a datetime value of formats YYMMDD, YYYYMMDD, YYMMDDHHMSS,
-    YYYYMMDDHHMMSS to broken-down TIME representation. Return value in
+    YYYYMMDDHHMMSS to broken-down MYSQL_TIME representation. Return value in
     YYYYMMDDHHMMSS format as side-effect.
 
     This function also checks if datetime value fits in DATETIME range.
@@ -1150,6 +1150,7 @@
  ok:
   part1=(long) (nr/LL(1000000));
   part2=(long) (nr - (longlong) part1*LL(1000000));
+  time_res->neg=   0;
   time_res->year=  (int) (part1/10000L);  part1%=10000L;
   time_res->month= (int) part1 / 100;
   time_res->day=   (int) part1 % 100;
@@ -1186,7 +1187,7 @@
 }
 
 
-/* Convert TIME value to integer in YYYYMMDD format */
+/* Convert MYSQL_TIME value to integer in YYYYMMDD format */
 
 ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *my_time)
 {
@@ -1196,7 +1197,7 @@
 
 
 /*
-  Convert TIME value to integer in HHMMSS format.
+  Convert MYSQL_TIME value to integer in HHMMSS format.
   This function doesn't take into account time->day member:
   it's assumed that days have been converted to hours already.
 */
@@ -1210,7 +1211,7 @@
 
 
 /*
-  Convert struct TIME (date and time split into year/month/day/hour/...
+  Convert struct MYSQL_TIME (date and time split into year/month/day/hour/...
   to a number in format YYYYMMDDHHMMSS (DATETIME),
   YYYYMMDD (DATE)  or HHMMSS (TIME).
 
@@ -1224,7 +1225,7 @@
     SELECT ?+1;
 
   NOTE
-    This function doesn't check that given TIME structure members are
+    This function doesn't check that given MYSQL_TIME structure members are
     in valid range. If they are not, return value won't reflect any
     valid date either.
 */
Thread
bk commit into 5.1 tree (monty:1.2506)monty26 Mar