Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug26294/my50-bug26294
into zippy.cornsilk.net:/home/cmiller/work/mysql/bug26294/my51-bug26294 client/mysqlbinlog.cc: Auto merged include/my_time.h: Auto merged sql-common/my_time.c: Auto merged sql/init.cc: Auto merged sql/tztime.cc: Auto merged
This commit is contained in:
commit
add10a4849
@ -1926,7 +1926,7 @@ int main(int argc, char** argv)
|
|||||||
DBUG_ENTER("main");
|
DBUG_ENTER("main");
|
||||||
DBUG_PROCESS(argv[0]);
|
DBUG_PROCESS(argv[0]);
|
||||||
|
|
||||||
init_time(); // for time functions
|
my_init_time(); // for time functions
|
||||||
|
|
||||||
parse_args(&argc, (char***)&argv);
|
parse_args(&argc, (char***)&argv);
|
||||||
defaults_argv=argv;
|
defaults_argv=argv;
|
||||||
|
@ -95,7 +95,7 @@ long calc_daynr(uint year,uint month,uint day);
|
|||||||
uint calc_days_in_year(uint year);
|
uint calc_days_in_year(uint year);
|
||||||
uint year_2000_handling(uint year);
|
uint year_2000_handling(uint year);
|
||||||
|
|
||||||
void init_time(void);
|
void my_init_time(void);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -701,9 +701,9 @@ int check_time_range(struct st_mysql_time *my_time, int *warning)
|
|||||||
Prepare offset of system time zone from UTC for my_system_gmt_sec() func.
|
Prepare offset of system time zone from UTC for my_system_gmt_sec() func.
|
||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
init_time()
|
my_init_time()
|
||||||
*/
|
*/
|
||||||
void init_time(void)
|
void my_init_time(void)
|
||||||
{
|
{
|
||||||
time_t seconds;
|
time_t seconds;
|
||||||
struct tm *l_time,tm_tmp;
|
struct tm *l_time,tm_tmp;
|
||||||
@ -792,7 +792,7 @@ long calc_daynr(uint year,uint month,uint day)
|
|||||||
NOTES
|
NOTES
|
||||||
The idea is to cache the time zone offset from UTC (including daylight
|
The idea is to cache the time zone offset from UTC (including daylight
|
||||||
saving time) for the next call to make things faster. But currently we
|
saving time) for the next call to make things faster. But currently we
|
||||||
just calculate this offset during startup (by calling init_time()
|
just calculate this offset during startup (by calling my_init_time()
|
||||||
function) and use it all the time.
|
function) and use it all the time.
|
||||||
Time value provided should be legal time value (e.g. '2003-01-01 25:00:00'
|
Time value provided should be legal time value (e.g. '2003-01-01 25:00:00'
|
||||||
is not allowed).
|
is not allowed).
|
||||||
|
@ -35,7 +35,7 @@ void unireg_init(ulong options)
|
|||||||
wild_many='%'; wild_one='_'; wild_prefix='\\'; /* Change to sql syntax */
|
wild_many='%'; wild_one='_'; wild_prefix='\\'; /* Change to sql syntax */
|
||||||
|
|
||||||
current_pid=(ulong) getpid(); /* Save for later ref */
|
current_pid=(ulong) getpid(); /* Save for later ref */
|
||||||
init_time(); /* Init time-functions (read zone) */
|
my_init_time(); /* Init time-functions (read zone) */
|
||||||
#ifndef EMBEDDED_LIBRARY
|
#ifndef EMBEDDED_LIBRARY
|
||||||
my_abort_hook=unireg_abort; /* Abort with close of databases */
|
my_abort_hook=unireg_abort; /* Abort with close of databases */
|
||||||
#endif
|
#endif
|
||||||
|
@ -1034,7 +1034,7 @@ public:
|
|||||||
return lowest possible my_time_t in case of ambiguity or if we
|
return lowest possible my_time_t in case of ambiguity or if we
|
||||||
provide time corresponding to the time-gap.
|
provide time corresponding to the time-gap.
|
||||||
|
|
||||||
You should call init_time() function before using this function.
|
You should call my_init_time() function before using this function.
|
||||||
|
|
||||||
RETURN VALUE
|
RETURN VALUE
|
||||||
Corresponding my_time_t value or 0 in case of error
|
Corresponding my_time_t value or 0 in case of error
|
||||||
@ -2663,7 +2663,7 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
printf("gmt_sec_to_TIME = localtime for time_t in [1000000000,1100000000) range\n");
|
printf("gmt_sec_to_TIME = localtime for time_t in [1000000000,1100000000) range\n");
|
||||||
|
|
||||||
init_time();
|
my_init_time();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Be careful here! my_system_gmt_sec doesn't fully handle unnormalized
|
Be careful here! my_system_gmt_sec doesn't fully handle unnormalized
|
||||||
|
Loading…
x
Reference in New Issue
Block a user