Hi Kristofer!
* kpettersson@stripped <kpettersson@stripped> [07/07/25 11:50]:
>
> ChangeSet@stripped, 2007-07-25 09:43:49+02:00, thek@adventure.(none) +7 -0
> Bug#28641 CREATE EVENT with '2038.01.18 03:00:00' let server crash.
>
> Creating an EVENT to be executed at a time close to the end of the allowed
> range (2038.01.19 03:14:07 UTC) would cause the server to crash. The
> expected behavior is to accept all calendar times within the interval and
> reject all other values without crashing.
>
> This patch replaces the function 'sec_to_epoch_TIME' with a Time_zone API call.
> This function was broken because it invoked the internal function 'sec_to_epoch'
> without respecting the restrictions on the function parameters (and this caused
> assertion failure). It also was used as a reverse function to
> Time_zone_utc::gmt_sec_to_TIME which it isn't.
OK to push with one minor change.
> diff -Nrup a/sql/event_data_objects.cc b/sql/event_data_objects.cc
> --- a/sql/event_data_objects.cc 2007-07-01 23:35:47 +02:00
> +++ b/sql/event_data_objects.cc 2007-07-25 09:43:47 +02:00
> @@ -979,17 +979,18 @@ Event_queue_element::load_from_row(THD *
> DBUG_RETURN(TRUE);
>
> starts_null= table->field[ET_FIELD_STARTS]->is_null();
> + my_bool not_used= FALSE;
You don't need to initialize this variable since you are not
going to use its value anywhere...
Thank you for looking into this!
--
Dmitri Lenev, Software Developer
MySQL AB, www.mysql.com
Are you MySQL certified? http://www.mysql.com/certification