Commit a613782f authored by andrey@lmy004's avatar andrey@lmy004

more cosmetic before push of fix for bug#17289

parent 189baa16
...@@ -1061,6 +1061,7 @@ event_timed::get_create_event(THD *thd, String *buf) ...@@ -1061,6 +1061,7 @@ event_timed::get_create_event(THD *thd, String *buf)
RETURNS RETURNS
0 success 0 success
-99 No rights on this.dbname.str
-100 event in execution (parallel execution is impossible) -100 event in execution (parallel execution is impossible)
others retcodes of sp_head::execute_procedure() others retcodes of sp_head::execute_procedure()
*/ */
...@@ -1089,16 +1090,12 @@ event_timed::execute(THD *thd, MEM_ROOT *mem_root) ...@@ -1089,16 +1090,12 @@ event_timed::execute(THD *thd, MEM_ROOT *mem_root)
if (!sphead && (ret= compile(thd, mem_root))) if (!sphead && (ret= compile(thd, mem_root)))
goto done; goto done;
thd->db= dbname.str;
thd->db_length= dbname.length;
DBUG_PRINT("info", ("master_access=%d db_access=%d", DBUG_PRINT("info", ("master_access=%d db_access=%d",
thd->security_ctx->master_access, thd->security_ctx->db_access)); thd->security_ctx->master_access, thd->security_ctx->db_access));
change_security_context(thd, &save_ctx); change_security_context(thd, &save_ctx);
DBUG_PRINT("info", ("master_access=%d db_access=%d", DBUG_PRINT("info", ("master_access=%d db_access=%d",
thd->security_ctx->master_access, thd->security_ctx->db_access)); thd->security_ctx->master_access, thd->security_ctx->db_access));
// if (mysql_change_db(thd, dbname.str, 0)) if (mysql_change_db(thd, dbname.str, 0))
if (!check_access(thd, EVENT_ACL,dbname.str, 0, 0, 0,is_schema_db(dbname.str)))
{ {
List<Item> empty_item_list; List<Item> empty_item_list;
empty_item_list.empty(); empty_item_list.empty();
...@@ -1113,7 +1110,6 @@ event_timed::execute(THD *thd, MEM_ROOT *mem_root) ...@@ -1113,7 +1110,6 @@ event_timed::execute(THD *thd, MEM_ROOT *mem_root)
restore_security_context(thd, save_ctx); restore_security_context(thd, save_ctx);
DBUG_PRINT("info", ("master_access=%d db_access=%d", DBUG_PRINT("info", ("master_access=%d db_access=%d",
thd->security_ctx->master_access, thd->security_ctx->db_access)); thd->security_ctx->master_access, thd->security_ctx->db_access));
thd->db= 0;
VOID(pthread_mutex_lock(&this->LOCK_running)); VOID(pthread_mutex_lock(&this->LOCK_running));
running= false; running= false;
......
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