diff options
author | unknown <konstantin@mysql.com> | 2004-06-24 19:09:31 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2004-06-24 19:09:31 +0400 |
commit | 8d0f2687779de0354d14c83e093991d811138b42 (patch) | |
tree | 1c3eec012abfb2a5d98d1db69e459003b89bedd1 /include | |
parent | 73d9c9b129475dec400092badb9c1adec892a4da (diff) | |
parent | 9dde418895f2d236234b975c4ada88ad624e8ba4 (diff) | |
download | mariadb-git-8d0f2687779de0354d14c83e093991d811138b42.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/mysql/mysql-4.1-4030
sql/field.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/tztime.cc:
Auto merged
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 2 | ||||
-rw-r--r-- | include/my_time.h | 46 | ||||
-rw-r--r-- | include/mysql.h | 18 | ||||
-rw-r--r-- | include/mysql_time.h | 37 |
4 files changed, 85 insertions, 18 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index 10e1b12a770..bf5fd0aca0c 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -22,7 +22,7 @@ pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \ errmsg.h my_global.h my_net.h my_alloc.h \ my_getopt.h sslopt-longopts.h my_dir.h typelib.h \ sslopt-vars.h sslopt-case.h sql_common.h keycache.h \ - sql_state.h $(BUILT_SOURCES) + sql_state.h mysql_time.h $(BUILT_SOURCES) noinst_HEADERS = config-win.h config-os2.h config-netware.h \ nisam.h heap.h merge.h my_bitmap.h\ myisam.h myisampack.h myisammrg.h ft_global.h\ 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_ */ diff --git a/include/mysql.h b/include/mysql.h index 931995fb1ac..12220c259b7 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -55,6 +55,7 @@ typedef int my_socket; #endif /* _global_h */ #include "mysql_com.h" +#include "mysql_time.h" #include "mysql_version.h" #include "typelib.h" @@ -533,23 +534,6 @@ enum enum_mysql_stmt_state MYSQL_STMT_FETCH_DONE }; -/* - client TIME structure to handle TIME, DATE and TIMESTAMP directly in - binary protocol -*/ -enum mysql_st_timestamp_type { MYSQL_TIMESTAMP_NONE, MYSQL_TIMESTAMP_DATE, - MYSQL_TIMESTAMP_FULL, MYSQL_TIMESTAMP_TIME }; - -typedef struct mysql_st_time -{ - unsigned int year,month,day,hour,minute,second; - unsigned long second_part; - my_bool neg; - - enum mysql_st_timestamp_type time_type; - -} MYSQL_TIME; - /* bind structure */ typedef struct st_mysql_bind diff --git a/include/mysql_time.h b/include/mysql_time.h new file mode 100644 index 00000000000..943d018fc14 --- /dev/null +++ b/include/mysql_time.h @@ -0,0 +1,37 @@ +/* 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 */ + +#ifndef _mysql_time_h_ +#define _mysql_time_h_ + +/* Time declarations shared between server and client library */ + +enum enum_mysql_timestamp_type +{ + MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1, + MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2 +}; + + +typedef struct st_mysql_time +{ + unsigned int year, month, day, hour, minute, second; + unsigned long second_part; + my_bool neg; + enum enum_mysql_timestamp_type time_type; +} MYSQL_TIME; + +#endif /* _mysql_time_h_ */ |