summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorguilhem@mysql.com <>2004-07-29 23:25:58 +0200
committerguilhem@mysql.com <>2004-07-29 23:25:58 +0200
commit0f3e279a05f99b2d05f22d27a52d4e82465a7cb4 (patch)
tree2f01af661dcc90a418853b7a1718fd7a0fe688e1 /include
parent6fdafa5635d5ad369f7a4e5272b818b9e4957a1c (diff)
downloadmariadb-git-0f3e279a05f99b2d05f22d27a52d4e82465a7cb4.tar.gz
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).
Diffstat (limited to 'include')
-rw-r--r--include/my_time.h7
-rw-r--r--include/mysql_time.h9
2 files changed, 16 insertions, 0 deletions
diff --git a/include/my_time.h b/include/my_time.h
index e42f7e9e402..1212f0533e2 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -41,6 +41,13 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time,
int *was_cut);
+long calc_daynr(uint year,uint month,uint day);
+
+void init_time(void);
+
+my_time_t
+my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap);
+
C_MODE_END
#endif /* _my_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_ */