mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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. BitKeeper/deleted/.del-events_priv.h~2e8bce2cf35997df: Delete: sql/events_priv.h sql/Makefile.am: events_priv.h is no more sql/event_data_objects.cc: reorganize events code sql/event_data_objects.h: reorganize events code sql/event_db_repository.cc: reorganize events code sql/event_db_repository.h: reorganize events code sql/event_scheduler.cc: reorganize events code sql/event_scheduler.h: reorganize events code sql/events.cc: reorganize events code sql/events.h: reorganize events code sql/mysqld.cc: reorganize events code sql/set_var.cc: reorganize events code sql/sql_class.cc: add ::change_security_context() and restore_security_context() sql/sql_class.h: add ::change_security_context() and restore_security_context() sql/sql_db.cc: reorganize Events code sql/sql_parse.cc: reorganize Events code sql/sql_show.cc: reorganize Events code
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user