Below is the list of changes that have just been committed into a local
5.1 repository of cps. When cps does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-12-05 19:04:46+03:00, petr@stripped +2 -0
remove assert
sql/event_data_objects.cc@stripped, 2006-12-05 19:04:43+03:00, petr@stripped +16 -9
add a comments that using gmt_sec_to_TIME() won't
be safe after 2038. per andrey's request
sql/event_queue.cc@stripped, 2006-12-05 19:04:43+03:00, petr@stripped +0 -1
remove assert, which aborts server in the case when it shouldn't
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: petr
# Host: outpost.site
# Root: /home/cps/mysql/trees/mysql-5.1-runtime
--- 1.19/sql/event_queue.cc 2006-11-27 02:47:24 +03:00
+++ 1.20/sql/event_queue.cc 2006-12-05 19:04:43 +03:00
@@ -160,7 +160,6 @@
{
sql_print_error("SCHEDULER: sizeof(my_time_t) != sizeof(time_t) ."
"The scheduler may not work correctly. Stopping");
- DBUG_ASSERT(0);
goto err;
}
--- 1.81/sql/event_data_objects.cc 2006-11-30 04:40:27 +03:00
+++ 1.82/sql/event_data_objects.cc 2006-12-05 19:04:43 +03:00
@@ -395,7 +395,14 @@
if ((not_used= item_starts->get_date(<ime, TIME_NO_ZERO_DATE)))
goto wrong_value;
- /* Let's check whether time is in the past */
+ /*
+ Let's check whether time is in the past.
+ Note: This call is not post year 2038 safe. That's because
+ thd->query_start() is of time_t, while gmt_sec_to_TIME()
+ wants my_time_t. In the case time_t is larger than my_time_t
+ an overflow might happen and events subsystem will not work as
+ expected.
+ */
thd->variables.time_zone->gmt_sec_to_TIME(&time_tmp,
(my_time_t) thd->query_start());
@@ -407,12 +414,12 @@
goto wrong_value;
/*
- This may result in a 1970-01-01 date if ltime is > 2037-xx-xx.
- CONVERT_TZ has similar problem.
- mysql_priv.h currently lists
+ Again, after 2038 this code won't work. As
+ mysql_priv.h currently lists
#define TIMESTAMP_MAX_YEAR 2038 (see TIME_to_timestamp())
*/
- my_tz_UTC->gmt_sec_to_TIME(<ime,t=TIME_to_timestamp(thd, <ime,
¬_used));
+ my_tz_UTC->gmt_sec_to_TIME(<ime,t=TIME_to_timestamp(thd, <ime,
+ ¬_used));
if (!t)
goto wrong_value;
@@ -465,13 +472,13 @@
goto error_bad_params;
/*
- This may result in a 1970-01-01 date if ltime is > 2037-xx-xx.
- CONVERT_TZ has similar problem.
- mysql_priv.h currently lists
+ Again, after 2038 this code won't work. As
+ mysql_priv.h currently lists
#define TIMESTAMP_MAX_YEAR 2038 (see TIME_to_timestamp())
*/
DBUG_PRINT("info", ("get the UTC time"));
- my_tz_UTC->gmt_sec_to_TIME(<ime,t=TIME_to_timestamp(thd, <ime,
¬_used));
+ my_tz_UTC->gmt_sec_to_TIME(<ime,t=TIME_to_timestamp(thd, <ime,
+ ¬_used));
if (!t)
goto error_bad_params;
| Thread |
|---|
| • bk commit into 5.1 tree (petr:1.2374) | Petr Chardin | 5 Dec |