1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

WL#3337 (Events new architecture)

5th cut, moved DB related code to Event_db_repository and
updated accordingly the remanining code.
Moved change/restore_security_context() to class THD
Removed events_priv.h
Next step is to reorganize create/update_event() and parsing for them.
But probably some other refactoring could be done in the meanwhile.
The changes so far pass the test suite.
This commit is contained in:
andrey@lmy004.
2006-06-28 01:28:03 +02:00
parent 0c439c9f76
commit 9309fae9b5
17 changed files with 1220 additions and 1082 deletions

View File

@@ -3847,13 +3847,14 @@ end_with_restore_list:
switch (lex->sql_command) {
case SQLCOM_CREATE_EVENT:
res= Events::create_event(thd, lex->et, lex->event_parse_data,
(uint) lex->create_info.options,
&rows_affected);
res= Events::get_instance()->
create_event(thd, lex->et, lex->event_parse_data,
(uint) lex->create_info.options, &rows_affected);
break;
case SQLCOM_ALTER_EVENT:
res= Events::update_event(thd, lex->et, lex->event_parse_data,
lex->spname, &rows_affected);
res= Events::get_instance()->
update_event(thd, lex->et, lex->event_parse_data,
lex->spname, &rows_affected);
break;
default:;
}
@@ -3895,7 +3896,7 @@ end_with_restore_list:
}
if (lex->sql_command == SQLCOM_SHOW_CREATE_EVENT)
res= Events::show_create_event(thd, lex->spname);
res= Events::get_instance()->show_create_event(thd, lex->spname);
else
{
uint rows_affected= 1;
@@ -3904,8 +3905,9 @@ end_with_restore_list:
res= -1;
break;
}
if (!(res= Events::drop_event(thd, lex->spname, lex->drop_if_exists,
&rows_affected)))
if (!(res= Events::get_instance()->drop_event(thd, lex->spname,
lex->drop_if_exists,
&rows_affected)))
send_ok(thd, rows_affected);
}
break;
@@ -3913,7 +3915,7 @@ end_with_restore_list:
#ifndef DBUG_OFF
case SQLCOM_SHOW_SCHEDULER_STATUS:
{
res= Events::dump_internal_status(thd);
res= Events::get_instance()->dump_internal_status(thd);
break;
}
#endif