From 88e3aead85b7136fab3d8cfcfa19174c4c2e2662 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Jul 2004 23:25:58 +0200 Subject: WL#1580: --start-datetime, --stop-datetime, --start-position (alias for --position) and --stop-position options for mysqlbinlog, with a test file. This enables user to say "recover my database to how it was this morning at 10:30" (mysqlbinlog "--stop-datetime=2003-07-29 10:30:00"). Using time functions into client/ made me move them out of sql/ into sql-common/. + (small) fix for BUG#4507 "mysqlbinlog --read-from-remote-server sometimes cannot accept 2 binlogs" (that is, on command line). client/client_priv.h: new options for mysqlbinlog client/mysqlbinlog.cc: WL#1580: --start-datetime, --stop-datetime, --start-position (alias for --position) and --stop-position. (small) fix for BUG#4507 "mysqlbinlog --read-from-remote-server sometimes cannot accept 2 binlogs". include/my_time.h: importing time functions so that client/ files can use them. include/mysql_time.h: importing time types so that client/ files can use them. sql-common/my_time.c: importing time functions so that client/ files can use them. sql/mysql_priv.h: moving time functions out of sql/ into sql-common/ sql/time.cc: moving time functions out of sql/ into sql-common/ sql/tztime.h: moving time functions out of sql/ into sql-common/ --- include/mysql_time.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/mysql_time.h') diff --git a/include/mysql_time.h b/include/mysql_time.h index 943d018fc14..32da27ba33e 100644 --- a/include/mysql_time.h +++ b/include/mysql_time.h @@ -34,4 +34,13 @@ typedef struct st_mysql_time enum enum_mysql_timestamp_type time_type; } MYSQL_TIME; + +/* + Portable time_t replacement. + Should be signed and hold seconds for 1902-2038 range. +*/ +typedef long my_time_t; +#define MY_TIME_T_MAX LONG_MAX +#define MY_TIME_T_MIN LONG_MIN + #endif /* _mysql_time_h_ */ -- cgit v1.2.1