diff options
author | unknown <andrey@lmy004.> | 2006-03-01 04:22:05 +0100 |
---|---|---|
committer | unknown <andrey@lmy004.> | 2006-03-01 04:22:05 +0100 |
commit | 4296774f9222698170c3d3fc8912bd8409a35489 (patch) | |
tree | 849a730e12c3bca0b656c033cc9cfc97043f0ae5 /sql/event_executor.cc | |
parent | f92ec21f02cbca769900e1a3e76375608e8c5ef7 (diff) | |
download | mariadb-git-4296774f9222698170c3d3fc8912bd8409a35489.tar.gz |
save the modified value and compare it every time. the memory address
is not that reliable (re #17815). Not perfect solution but will work
till #17815 is fixed.
Diffstat (limited to 'sql/event_executor.cc')
-rw-r--r-- | sql/event_executor.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/event_executor.cc b/sql/event_executor.cc index 80b145250d1..92acf154c75 100644 --- a/sql/event_executor.cc +++ b/sql/event_executor.cc @@ -354,17 +354,24 @@ executor_wait_till_next_event_exec(THD *thd) DBUG_PRINT("evex main thread",("unlocked LOCK_event_arrays")); if (t2sleep > 0) { + ulonglong modified= et->modified; /* We sleep t2sleep seconds but we check every second whether this thread has been killed, or there is a new candidate */ while (t2sleep-- && !thd->killed && event_executor_running_global_var && evex_queue_num_elements(EVEX_EQ_NAME) && - (evex_queue_first_element(&EVEX_EQ_NAME, Event_timed*) == et)) + (evex_queue_first_element(&EVEX_EQ_NAME, Event_timed*) == et && + evex_queue_first_element(&EVEX_EQ_NAME, Event_timed*)->modified == + modified)) { - DBUG_PRINT("evex main thread",("will sleep a bit more")); + DBUG_PRINT("evex main thread",("will sleep a bit more.")); my_sleep(1000000); } + DBUG_PRINT("info",("saved_modified=%llu current=%llu", modified, + evex_queue_num_elements(EVEX_EQ_NAME)? + evex_queue_first_element(&EVEX_EQ_NAME, Event_timed*)->modified: + (ulonglong)~0)); } int ret= WAIT_STATUS_READY; |