diff options
Diffstat (limited to 'sql/event.cc')
-rw-r--r-- | sql/event.cc | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/sql/event.cc b/sql/event.cc index 4a3c6aad30c..c049fdc6c61 100644 --- a/sql/event.cc +++ b/sql/event.cc @@ -32,8 +32,8 @@ should be replicated as disabled. If an event is ALTERed as DISABLED the query should go untouched into the binary log, when ALTERed as enable then it should go as SLAVESIDE_DISABLED. This is regarding the SQL interface. - TT routines however modify mysql.event internally and this does not go the log - so in this case queries has to be injected into the log...somehow... or + TT routines however modify mysql.event internally and this does not go the + log so in this case queries has to be injected into the log...somehow... or maybe a solution is RBR for this case, because the event may go only from ENABLED to DISABLED status change and this is safe for replicating. As well an event may be deleted which is also safe for RBR. @@ -56,9 +56,9 @@ - Move comparison code to class Event_timed Warning: - - For now parallel execution is not possible because the same sp_head cannot be - executed few times!!! There is still no lock attached to particular event. - + - For now parallel execution is not possible because the same sp_head cannot + be executed few times!!! There is still no lock attached to particular + event. */ @@ -466,10 +466,10 @@ common_1_lev_code: Open mysql.event table for read SYNOPSIS - evex_open_event_table_for_read() - thd Thread context - lock_type How to lock the table - table The table pointer + evex_open_event_table() + thd Thread context + lock_type How to lock the table + table We will store the open table here RETURN 1 Cannot lock table @@ -499,7 +499,7 @@ evex_open_event_table(THD *thd, enum thr_lock_type lock_type, TABLE **table) DBUG_RETURN(2); } *table= tables.table; - + tables.table->use_all_columns(); DBUG_RETURN(0); } @@ -570,10 +570,12 @@ evex_db_find_event_by_name(THD *thd, const LEX_STRING dbname, table->field[EVEX_FIELD_DEFINER]->store(user_name.str, user_name.length, &my_charset_bin); - key_copy(key, table->record[0], table->key_info, table->key_info->key_length); + key_copy(key, table->record[0], table->key_info, + table->key_info->key_length); if (table->file->index_read_idx(table->record[0], 0, key, - table->key_info->key_length,HA_READ_KEY_EXACT)) + table->key_info->key_length, + HA_READ_KEY_EXACT)) DBUG_RETURN(EVEX_KEY_NOT_FOUND); DBUG_RETURN(0); @@ -755,7 +757,8 @@ db_create_event(THD *thd, Event_timed *et, my_bool create_if_not, } DBUG_PRINT("info", ("non-existant, go forward")); - if ((ret= sp_use_new_db(thd, et->dbname.str,olddb, sizeof(olddb),0, &dbchanged))) + if ((ret= sp_use_new_db(thd, et->dbname.str,olddb, sizeof(olddb),0, + &dbchanged))) { my_error(ER_BAD_DB_ERROR, MYF(0)); goto err; @@ -1471,7 +1474,9 @@ evex_drop_db_events(THD *thd, char *db) if ((ret= evex_open_event_table(thd, TL_WRITE, &table))) { - sql_print_error("Table mysql.event is damaged."); + if (errno != ENOENT) + sql_print_error("Table mysql.event is damaged. Got errno: %d on open", + my_errno); VOID(pthread_mutex_unlock(&LOCK_event_arrays)); DBUG_RETURN(SP_OPEN_TABLE_FAILED); } |