diff options
author | msvensson@pilot.blaudden <> | 2007-05-16 10:44:59 +0200 |
---|---|---|
committer | msvensson@pilot.blaudden <> | 2007-05-16 10:44:59 +0200 |
commit | a65d12a8303a894401495e70e0be63e7d4f37170 (patch) | |
tree | 890ba335add713d8bf248138165188b29e09cded /sql/tztime.h | |
parent | 19618b5375783d8e41724914e1a8a2167edced64 (diff) | |
download | mariadb-git-a65d12a8303a894401495e70e0be63e7d4f37170.tar.gz |
Backport of TIME->MYSQL_TIME / Y2K fixset
Made year 2000 handling more uniform
Removed year 2000 handling out from calc_days()
The above removes some bugs in date/datetimes with year between 0 and 200
Now we get a note when we insert a datetime value into a date column
For default values to CREATE, don't give errors for warning level NOTE
Fixed some compiler failures
Added library ws2_32 for windows compilation (needed if we want to compile with IOCP support)
Removed duplicate typedef TIME and replaced it with MYSQL_TIME
Better (more complete) fix for: Bug#21103 "DATE column not compared as DATE"
Fixed properly Bug#18997 "DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value"
Fixed Bug#23093 "Implicit conversion of 9912101 to date does not match cast(9912101 as date)"
Diffstat (limited to 'sql/tztime.h')
-rw-r--r-- | sql/tztime.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/tztime.h b/sql/tztime.h index d1f33843810..32a942a26e1 100644 --- a/sql/tztime.h +++ b/sql/tztime.h @@ -22,7 +22,7 @@ /* This class represents abstract time zone and provides - basic interface for TIME <-> my_time_t conversion. + basic interface for MYSQL_TIME <-> my_time_t conversion. Actual time zones which are specified by DB, or via offset or use system functions are its descendants. */ @@ -31,18 +31,18 @@ class Time_zone: public Sql_alloc public: Time_zone() {} /* Remove gcc warning */ /* - Converts local time in broken down TIME representation to + Converts local time in broken down MYSQL_TIME representation to my_time_t (UTC seconds since Epoch) represenation. Returns 0 in case of error. Sets in_dst_time_gap to true if date provided falls into spring time-gap (or lefts it untouched otherwise). */ - virtual my_time_t TIME_to_gmt_sec(const TIME *t, + virtual my_time_t TIME_to_gmt_sec(const MYSQL_TIME *t, my_bool *in_dst_time_gap) const = 0; /* Converts time in my_time_t representation to local time in - broken down TIME representation. + broken down MYSQL_TIME representation. */ - virtual void gmt_sec_to_TIME(TIME *tmp, my_time_t t) const = 0; + virtual void gmt_sec_to_TIME(MYSQL_TIME *tmp, my_time_t t) const = 0; /* Because of constness of String returned by get_name() time zone name have to be already zeroended to be able to use String::ptr() instead |