diff options
author | kostja@bodhi.local <> | 2007-03-23 19:14:08 +0300 |
---|---|---|
committer | kostja@bodhi.local <> | 2007-03-23 19:14:08 +0300 |
commit | bf6210bed5721385356f15ad4204819cfad1a73e (patch) | |
tree | 2db2252e3c25e36e26ad76446f7a49e013b72d43 /sql/event_scheduler.cc | |
parent | 9b227f8f3ab2568e48de3e42964a2cc6f0b6e283 (diff) | |
download | mariadb-git-bf6210bed5721385356f15ad4204819cfad1a73e.tar.gz |
Change module prefix in error messages: SCHEDULER -> Event Scheduler,
to not collide with the recently introduced thread scheduler module.
Diffstat (limited to 'sql/event_scheduler.cc')
-rw-r--r-- | sql/event_scheduler.cc | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index 287bed27bd6..d50ea932596 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -78,7 +78,7 @@ Event_worker_thread::print_warnings(THD *thd, Event_job_data *et) char prefix_buf[5 * STRING_BUFFER_USUAL_SIZE]; String prefix(prefix_buf, sizeof(prefix_buf), system_charset_info); prefix.length(0); - prefix.append("SCHEDULER: ["); + prefix.append("Event Scheduler: ["); append_identifier(thd, &prefix, et->definer.str, et->definer.length); prefix.append("][", 2); @@ -304,7 +304,8 @@ Event_worker_thread::run(THD *thd, Event_queue_element_for_exec *event) goto end; } - sql_print_information("SCHEDULER: [%s.%s of %s] executing in thread %lu. ", + sql_print_information("Event Scheduler: " + "[%s.%s of %s] executing in thread %lu. ", job_data->dbname.str, job_data->name.str, job_data->definer.str, thd->thread_id); @@ -314,23 +315,25 @@ Event_worker_thread::run(THD *thd, Event_queue_element_for_exec *event) print_warnings(thd, job_data); - sql_print_information("SCHEDULER: [%s.%s of %s] executed in thread %lu. " + sql_print_information("Event Scheduler: " + "[%s.%s of %s] executed in thread %lu. " "RetCode=%d", job_data->dbname.str, job_data->name.str, job_data->definer.str, thd->thread_id, ret); if (ret == EVEX_COMPILE_ERROR) - sql_print_information("SCHEDULER: COMPILE ERROR for event %s.%s of %s", + sql_print_information("Event Scheduler: " + "COMPILE ERROR for event %s.%s of %s", job_data->dbname.str, job_data->name.str, job_data->definer.str); else if (ret == EVEX_MICROSECOND_UNSUP) - sql_print_information("SCHEDULER: MICROSECOND is not supported"); + sql_print_information("Event Scheduler: MICROSECOND is not supported"); end: delete job_data; if (event->dropped) { - sql_print_information("SCHEDULER: Dropping %s.%s", event->dbname.str, - event->name.str); + sql_print_information("Event Scheduler: Dropping %s.%s", + event->dbname.str, event->name.str); /* Using db_repository can lead to a race condition because we access the table without holding LOCK_metadata. @@ -442,7 +445,7 @@ Event_scheduler::start() if (!(new_thd= new THD)) { - sql_print_error("SCHEDULER: Cannot init manager event thread"); + sql_print_error("Event Scheduler: Cannot initialize the scheduler thread"); ret= TRUE; goto end; } @@ -501,7 +504,7 @@ Event_scheduler::run(THD *thd) int res= FALSE; DBUG_ENTER("Event_scheduler::run"); - sql_print_information("SCHEDULER: Manager thread started with id %lu", + sql_print_information("Event Scheduler: scheduler thread started with id %lu", thd->thread_id); /* Recalculate the values in the queue because there could have been stops @@ -516,7 +519,8 @@ Event_scheduler::run(THD *thd) /* Gets a minimized version */ if (queue->get_top_for_execution_if_time(thd, &event_name)) { - sql_print_information("SCHEDULER: Serious error during getting next " + sql_print_information("Event Scheduler: " + "Serious error during getting next " "event to execute. Stopping"); break; } @@ -540,7 +544,7 @@ Event_scheduler::run(THD *thd) state= INITIALIZED; pthread_cond_signal(&COND_state); UNLOCK_DATA(); - sql_print_information("SCHEDULER: Stopped"); + sql_print_information("Event Scheduler: Stopped"); DBUG_RETURN(res); } @@ -657,8 +661,8 @@ Event_scheduler::stop() /* Guarantee we don't catch spurious signals */ do { - DBUG_PRINT("info", ("Waiting for COND_started_or_stopped from the manager " - "thread. Current value of state is %s . " + DBUG_PRINT("info", ("Waiting for COND_started_or_stopped from " + "the scheduler thread. Current value of state is %s . " "workers count=%d", scheduler_states_names[state].str, workers_count())); /* @@ -672,20 +676,23 @@ Event_scheduler::stop() */ state= STOPPING; - DBUG_PRINT("info", ("Manager thread has id %lu", scheduler_thd->thread_id)); + DBUG_PRINT("info", ("Scheduler thread has id %lu", + scheduler_thd->thread_id)); /* Lock from delete */ pthread_mutex_lock(&scheduler_thd->LOCK_delete); /* This will wake up the thread if it waits on Queue's conditional */ - sql_print_information("SCHEDULER: Killing manager thread %lu", + sql_print_information("Event Scheduler: Killing the scheduler thread, " + "thread id %lu", scheduler_thd->thread_id); scheduler_thd->awake(THD::KILL_CONNECTION); pthread_mutex_unlock(&scheduler_thd->LOCK_delete); /* thd could be 0x0, when shutting down */ - sql_print_information("SCHEDULER: Waiting the manager thread to reply"); + sql_print_information("Event Scheduler: " + "Waiting for the scheduler thread to reply"); COND_STATE_WAIT(thd, NULL, "Waiting scheduler to stop"); } while (state == STOPPING); - DBUG_PRINT("info", ("Manager thread has cleaned up. Set state to INIT")); + DBUG_PRINT("info", ("Scheduler thread has cleaned up. Set state to INIT")); /* The rationale behind setting it to NULL here but not destructing it beforehand is because the THD will be deinited in event_scheduler_thread(). |