Commit bf6210be authored by kostja@bodhi.local's avatar kostja@bodhi.local

Change module prefix in error messages: SCHEDULER -> Event Scheduler,

to not collide with the recently introduced thread scheduler module.
parent 9b227f8f
......@@ -229,10 +229,10 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E
events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED
ALTER TABLE mysql.event ADD dummy INT FIRST;
SHOW EVENTS;
ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. Table probably corrupted
ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. The table is probably corrupted
ALTER TABLE mysql.event DROP dummy, ADD dummy2 VARCHAR(64) FIRST;
SHOW EVENTS;
ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. Table probably corrupted
ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. The table is probably corrupted
ALTER TABLE mysql.event DROP dummy2;
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status
......@@ -241,7 +241,7 @@ CREATE TABLE event_like LIKE mysql.event;
INSERT INTO event_like SELECT * FROM mysql.event;
ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default '';
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log.
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details
ALTER TABLE mysql.event MODIFY db char(20) character set utf8 collate utf8_bin default '';
SHOW CREATE TABLE mysql.event;
Table Create Table
......@@ -266,7 +266,7 @@ event CREATE TABLE `event` (
PRIMARY KEY (`db`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events'
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log.
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details
ALTER TABLE mysql.event MODIFY db char(64) character set utf8 collate utf8_bin default '';
"This should work"
SHOW EVENTS;
......@@ -274,13 +274,13 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E
events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED
ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default '';
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log.
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details
ALTER TABLE mysql.event MODIFY db varchar(64) character set utf8 collate utf8_bin default '';
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log.
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details
ALTER TABLE mysql.event DROP comment, DROP starts;
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 15. Table probably corrupted
ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 15. The table is probably corrupted
DROP TABLE mysql.event;
CREATE TABLE mysql.event like event_like;
INSERT INTO mysql.event SELECT * FROM event_like;
......
......@@ -1926,9 +1926,10 @@ Event_job_data::compile(THD *thd, MEM_ROOT *mem_root)
thd->is_fatal_error));
lex.unit.cleanup();
sql_print_error("SCHEDULER: Error during compilation of %s.%s or "
"thd->is_fatal_error: %d",
dbname.str, name.str, thd->is_fatal_error);
sql_print_error("Event Scheduler: "
"%serror during compilation of %s.%s",
thd->is_fatal_error ? "fatal " : "",
dbname.str, name.str);
ret= EVEX_COMPILE_ERROR;
goto done;
......
......@@ -138,7 +138,7 @@ Event_queue::init_queue(THD *thd)
0 /*max_on_top*/, event_queue_element_compare_q,
NULL, EVENT_QUEUE_EXTENT))
{
sql_print_error("SCHEDULER: Can't initialize the execution queue");
sql_print_error("Event Scheduler: Can't initialize the execution queue");
goto err;
}
......@@ -453,7 +453,8 @@ Event_queue::empty_queue()
uint i;
DBUG_ENTER("Event_queue::empty_queue");
DBUG_PRINT("enter", ("Purging the queue. %u element(s)", queue.elements));
sql_print_information("SCHEDULER: Purging queue. %u events", queue.elements);
sql_print_information("Event Scheduler: Purging the queue. %u events",
queue.elements);
/* empty the queue */
for (i= 0; i < queue.elements; ++i)
{
......@@ -586,7 +587,7 @@ Event_queue::get_top_for_execution_if_time(THD *thd,
if (top->status == Event_queue_element::DISABLED)
{
DBUG_PRINT("info", ("removing from the queue"));
sql_print_information("SCHEDULER: Last execution of %s.%s. %s",
sql_print_information("Event Scheduler: Last execution of %s.%s. %s",
top->dbname.str, top->name.str,
top->dropped? "Dropping.":"");
delete top;
......
......@@ -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().
......
......@@ -641,7 +641,7 @@ Events::init()
if (check_system_tables(thd))
{
check_system_tables_error= TRUE;
sql_print_error("SCHEDULER: The system tables are damaged. "
sql_print_error("Event Scheduler: The system tables are damaged. "
"The scheduler subsystem will be unusable during this run.");
goto end;
}
......@@ -649,7 +649,7 @@ Events::init()
if (event_queue->init_queue(thd) || load_events_from_db(thd))
{
sql_print_error("SCHEDULER: Error while loading from disk.");
sql_print_error("Event Scheduler: Error while loading from disk.");
goto end;
}
......@@ -862,7 +862,7 @@ Events::check_system_tables(THD *thd)
if ((ret= simple_open_n_lock_tables(thd, &tables)))
{
sql_print_error("SCHEDULER: Cannot open mysql.db");
sql_print_error("Event Scheduler: Cannot open mysql.db");
ret= TRUE;
}
ret= table_check_intact(tables.table, MYSQL_DB_FIELD_COUNT,
......@@ -877,7 +877,7 @@ Events::check_system_tables(THD *thd)
if (simple_open_n_lock_tables(thd, &tables))
{
sql_print_error("SCHEDULER: Cannot open mysql.user");
sql_print_error("Event Scheduler: Cannot open mysql.user");
ret= TRUE;
}
else
......@@ -933,7 +933,7 @@ Events::load_events_from_db(THD *thd)
if ((ret= db_repository->open_event_table(thd, TL_READ, &table)))
{
sql_print_error("SCHEDULER: Table mysql.event is damaged. Can not open");
sql_print_error("Event Scheduler: Table mysql.event is damaged. Can not open");
DBUG_RETURN(EVEX_OPEN_TABLE_FAILED);
}
......@@ -950,8 +950,9 @@ Events::load_events_from_db(THD *thd)
if ((ret= et->load_from_row(thd, table)))
{
sql_print_error("SCHEDULER: Error while loading from mysql.event. "
"Table probably corrupted");
sql_print_error("Event Scheduler: "
"Error while reading from mysql.event. "
"The table is probably corrupted");
break;
}
if (et->status != Event_queue_element::ENABLED)
......@@ -964,7 +965,7 @@ Events::load_events_from_db(THD *thd)
/* let's find when to be executed */
if (et->compute_next_execution_time())
{
sql_print_error("SCHEDULER: Error while computing execution time of %s.%s."
sql_print_error("Event Scheduler: Error while computing execution time of %s.%s."
" Skipping", et->dbname.str, et->name.str);
continue;
}
......@@ -981,11 +982,11 @@ Events::load_events_from_db(THD *thd)
*/
switch (ret= temp_job_data.compile(thd, thd->mem_root)) {
case EVEX_MICROSECOND_UNSUP:
sql_print_error("SCHEDULER: mysql.event is tampered. MICROSECOND is not "
sql_print_error("Event Scheduler: mysql.event is tampered. MICROSECOND is not "
"supported but found in mysql.event");
break;
case EVEX_COMPILE_ERROR:
sql_print_error("SCHEDULER: Error while compiling %s.%s. Aborting load",
sql_print_error("Event Scheduler: Error while compiling %s.%s. Aborting load",
et->dbname.str, et->name.str);
break;
default:
......@@ -1017,8 +1018,8 @@ Events::load_events_from_db(THD *thd)
else
{
ret= 0;
sql_print_information("SCHEDULER: Loaded %d event%s", count,
(count == 1)?"":"s");
sql_print_information("Event Scheduler: Loaded %d event%s",
count, (count == 1)?"":"s");
}
close_thread_tables(thd);
......
......@@ -5881,10 +5881,10 @@ ER_EVENT_NEITHER_M_EXPR_NOR_M_AT
eng "No datetime expression provided"
ger "Kein DATETIME-Ausdruck angegeben"
ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
eng "Column count of mysql.%s is wrong. Expected %d, found %d. Table probably corrupted"
eng "Column count of mysql.%s is wrong. Expected %d, found %d. The table is probably corrupted"
ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d gefunden. Tabelle ist wahrscheinlich beschdigt"
ER_CANNOT_LOAD_FROM_TABLE
eng "Cannot load from mysql.%s. Table probably corrupted. See error log."
eng "Cannot load from mysql.%s. The table is probably corrupted. Please see the error log for details"
ger "Kann mysql.%s nicht einlesen. Tabelle ist wahrscheinlich beschdigt, siehe Fehlerlog"
ER_EVENT_CANNOT_DELETE
eng "Failed to delete the event from mysql.event"
......@@ -5982,7 +5982,7 @@ ER_EVENT_RECURSIVITY_FORBIDDEN
eng "Recursivity of EVENT DDL statements is forbidden when body is present"
ger "Rekursivitt von EVENT-DDL-Anweisungen ist unzulssig wenn ein Hauptteil (Body) existiert"
ER_EVENTS_DB_ERROR
eng "Cannot proceed because the tables used by events were found damaged at server start"
eng "Cannot proceed because system tables used by Event Scheduler were found damaged at server start"
ger "Kann nicht weitermachen, weil die Tabellen, die von Events verwendet werden, beim Serverstart als beschdigt markiert wurden"
ER_ONLY_INTEGERS_ALLOWED
eng "Only integers allowed as number here"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment