diff options
author | konstantin@mysql.com <> | 2004-06-24 19:08:36 +0400 |
---|---|---|
committer | konstantin@mysql.com <> | 2004-06-24 19:08:36 +0400 |
commit | a30fcdc690955b883376fe56c099c97c944ab7c8 (patch) | |
tree | 51efbaacdacd9dad5c2745e3ccb58a3614f4f608 /sql/structs.h | |
parent | 3bcbdcb4061bbdf264c8b7d2ddd0cb7fb47fb8b4 (diff) | |
download | mariadb-git-a30fcdc690955b883376fe56c099c97c944ab7c8.tar.gz |
Fix for Bug#4030 "Client side conversion string -> date type doesn't
work (prepared statements)" and after-review fixes:
- str_to_TIME renamed to str_to_datetime to pair with str_to_time
- functions str_to_time and str_to_TIME moved to sql-common
- send_data_str now supports MYSQL_TYPE_TIME, MYSQL_TIME_DATE,
MYSQL_TIME_DATETIME types of user input buffers.
- few more comments in the client library
- a test case added.
Diffstat (limited to 'sql/structs.h')
-rw-r--r-- | sql/structs.h | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/sql/structs.h b/sql/structs.h index ee231186e1a..c30d85f59cb 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -130,23 +130,14 @@ typedef struct st_read_record { /* Parameter to read_record */ } READ_RECORD; -enum timestamp_type -{ - TIMESTAMP_NONE= -2, TIMESTAMP_DATETIME_ERROR= -1, - TIMESTAMP_DATE= 0, TIMESTAMP_DATETIME= 1, TIMESTAMP_TIME= 2 -}; - -/* Parameters to str_to_TIME */ -#define TIME_FUZZY_DATE 1 -#define TIME_DATETIME_ONLY 2 - - -typedef struct st_time { - uint year,month,day,hour,minute,second; - ulong second_part; - bool neg; - timestamp_type time_type; -} TIME; +/* + Originally MySQL used TIME structure inside server only, but since + 4.1 it's exported to user in the new client API. Define aliases for + new names to keep existing code simple. +*/ + +typedef struct st_mysql_time TIME; +typedef enum enum_mysql_timestamp_type timestamp_type; typedef struct { |