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 /include/my_time.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 'include/my_time.h')
-rw-r--r-- | include/my_time.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/my_time.h b/include/my_time.h new file mode 100644 index 00000000000..e42f7e9e402 --- /dev/null +++ b/include/my_time.h @@ -0,0 +1,46 @@ +/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* + This is a private header of sql-common library, containing + declarations for my_time.c +*/ + +#ifndef _my_time_h_ +#define _my_time_h_ +#include "my_global.h" +#include "mysql_time.h" + +C_MODE_START + +extern ulonglong log_10_int[20]; + +#define YY_PART_YEAR 70 + +/* Flags to str_to_datetime */ +#define TIME_FUZZY_DATE 1 +#define TIME_DATETIME_ONLY 2 + +enum enum_mysql_timestamp_type +str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, + uint flags, int *was_cut); + +bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time, + int *was_cut); + +C_MODE_END + +#endif /* _my_time_h_ */ |