Below is the list of changes that have just been committed into a local
5.1 repository of tomash. When tomash 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, 2007-03-16 20:50:37+03:00, kroki@stripped +2 -0
Fix compilation on Windows broken with the push of bug#16420.
Fix three compilation warnings.
sql/event_data_objects.cc@stripped, 2007-03-16 20:50:34+03:00, kroki@stripped +2 -2
Fix compilation warnings.
sql/event_queue.cc@stripped, 2007-03-16 20:50:34+03:00, kroki@stripped +5 -9
Fix compilation warning: reimplement event_queue_element_compare_q()
properly.
Use set_timespec() to initialize struct timespec.
# 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: kroki
# Host: moonlight.home
# Root: /home/tomash/src/mysql_ab/mysql-5.1-wl3698
--- 1.26/sql/event_queue.cc 2007-03-16 20:50:48 +03:00
+++ 1.27/sql/event_queue.cc 2007-03-16 20:50:48 +03:00
@@ -65,13 +65,10 @@ struct event_queue_param
static int
event_queue_element_compare_q(void *vptr, byte* a, byte *b)
{
- /*
- Note that no overflow is possible here because both values are
- non-negative, and subtraction is done in the signed my_time_t
- type.
- */
- return (((Event_queue_element *)a)->execute_at
- - ((Event_queue_element *)b)->execute_at);
+ my_time_t lhs = ((Event_queue_element *)a)->execute_at;
+ my_time_t rhs = ((Event_queue_element *)b)->execute_at;
+
+ return (lhs < rhs ? -1 : (lhs > rhs ? 1 : 0));
}
@@ -580,8 +577,7 @@ Event_queue::get_top_for_execution_if_ti
time or until signaled. Release LOCK_queue while waiting.
*/
struct timespec top_time;
- top_time.tv_sec= next_activation_at;
- top_time.tv_nsec= 0;
+ set_timespec(top_time, next_activation_at - thd->query_start());
cond_wait(thd, &top_time, queue_wait_msg, SCHED_FUNC, __LINE__);
continue;
--- 1.87/sql/event_data_objects.cc 2007-03-16 20:50:48 +03:00
+++ 1.88/sql/event_data_objects.cc 2007-03-16 20:50:48 +03:00
@@ -1293,7 +1293,7 @@ bool get_next_time(const Time_zone *time
time, and this will greatly reduce the effect of the
optimization. So instead we keep the code simple and clean.
*/
- interval.month= diff_months - diff_months % months;
+ interval.month= (ulong) (diff_months - diff_months % months);
next_time= add_interval(&local_start, time_zone,
INTERVAL_MONTH, interval);
if (next_time == 0)
@@ -1301,7 +1301,7 @@ bool get_next_time(const Time_zone *time
if (next_time <= time_now)
{
- interval.month= months;
+ interval.month= (ulong) months;
next_time= add_interval(&local_start, time_zone,
INTERVAL_MONTH, interval);
if (next_time == 0)
| Thread |
|---|
| • bk commit into 5.1 tree (kroki:1.2471) BUG#16420 | kroki | 16 Mar |