Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c25429f1
Commit
c25429f1
authored
Dec 05, 2006
by
petr/cps@outpost.site
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove assert
parent
b593a7af
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
sql/event_data_objects.cc
sql/event_data_objects.cc
+16
-9
sql/event_queue.cc
sql/event_queue.cc
+0
-1
No files found.
sql/event_data_objects.cc
View file @
c25429f1
...
...
@@ -395,7 +395,14 @@ Event_parse_data::init_starts(THD *thd)
if
((
not_used
=
item_starts
->
get_date
(
&
ltime
,
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 @@ Event_parse_data::init_starts(THD *thd)
goto
wrong_value
;
/*
This may result in a 1970-01-01 date if ltime is > 2037-xx-xx.
CONVERT_TZ has similar problem.
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
(
&
ltime
,
t
=
TIME_to_timestamp
(
thd
,
&
ltime
,
&
not_used
));
my_tz_UTC
->
gmt_sec_to_TIME
(
&
ltime
,
t
=
TIME_to_timestamp
(
thd
,
&
ltime
,
&
not_used
));
if
(
!
t
)
goto
wrong_value
;
...
...
@@ -465,13 +472,13 @@ Event_parse_data::init_ends(THD *thd)
goto
error_bad_params
;
/*
This may result in a 1970-01-01 date if ltime is > 2037-xx-xx.
CONVERT_TZ has similar problem.
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
(
&
ltime
,
t
=
TIME_to_timestamp
(
thd
,
&
ltime
,
&
not_used
));
my_tz_UTC
->
gmt_sec_to_TIME
(
&
ltime
,
t
=
TIME_to_timestamp
(
thd
,
&
ltime
,
&
not_used
));
if
(
!
t
)
goto
error_bad_params
;
...
...
sql/event_queue.cc
View file @
c25429f1
...
...
@@ -160,7 +160,6 @@ Event_queue::init_queue(THD *thd, Event_db_repository *db_repo)
{
sql_print_error
(
"SCHEDULER: sizeof(my_time_t) != sizeof(time_t) ."
"The scheduler may not work correctly. Stopping"
);
DBUG_ASSERT
(
0
);
goto
err
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment