1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00
- improve the stability of the executor
- make create event if not exists work as before


sql/event.cc:
  refactoring:
  - have only 1 routine for comparing TIME structures 
  fix:
  - after previous refactoring IF NOT EXISTS of CREATE EVENT did not work 
    anymore. Now it will work.
sql/event.h:
  update definitions
sql/event_executor.cc:
  - don't load DISABLED events
  - if an event is being disabled because of time restrictions - drop it from the 
    prio queue
  - move dropping to the worker process
sql/event_priv.h:
  - remove unneeded func
sql/share/errmsg.txt:
  fix error message
sql/sql_parse.cc:
  - support 0 rows affected when CREATE EVENT IF NOT EXISTS
This commit is contained in:
unknown
2005-12-28 12:07:57 +02:00
parent 9b323387b8
commit 3a12408a70
6 changed files with 83 additions and 144 deletions

View File

@@ -3675,6 +3675,7 @@ end_with_restore_list:
case SQLCOM_ALTER_EVENT:
case SQLCOM_DROP_EVENT:
{
uint rows_affected= 1;
DBUG_ASSERT(lex->et);
do {
if (! lex->et->dbname.str)
@@ -3690,17 +3691,18 @@ end_with_restore_list:
switch (lex->sql_command) {
case SQLCOM_CREATE_EVENT:
res= evex_create_event(thd, lex->et, (uint) lex->create_info.options);
res= evex_create_event(thd, lex->et, (uint) lex->create_info.options,
&rows_affected);
break;
case SQLCOM_ALTER_EVENT:
res= evex_update_event(thd, lex->et, lex->spname);
res= evex_update_event(thd, lex->et, lex->spname, &rows_affected);
break;
case SQLCOM_DROP_EVENT:
res= evex_drop_event(thd, lex->et, lex->drop_if_exists);
res= evex_drop_event(thd, lex->et, lex->drop_if_exists, &rows_affected);
default:;
}
if (!res)
send_ok(thd, 1);
send_ok(thd, rows_affected);
/* lex->unit.cleanup() is called outside, no need to call it here */
} while (0);