summaryrefslogtreecommitdiff
path: root/sql/event_timed.cc
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2006-02-15 22:32:25 +0100
committerunknown <andrey@lmy004.>2006-02-15 22:32:25 +0100
commit4e2b90b1245dfed681bd29e8a6ff91f5ce616a11 (patch)
treeb66e46832d901c3c450b293070894702ff9e3d8d /sql/event_timed.cc
parent8fd74f314b07aee260401d17d0a28dc9c8b5bc35 (diff)
downloadmariadb-git-4e2b90b1245dfed681bd29e8a6ff91f5ce616a11.tar.gz
more cosmetic before push of fix for bug#17289
sql/event_timed.cc: - fix comment - use mysql_change_db() this will check for us
Diffstat (limited to 'sql/event_timed.cc')
-rw-r--r--sql/event_timed.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/sql/event_timed.cc b/sql/event_timed.cc
index b888ff89f05..c6831bfaf8c 100644
--- a/sql/event_timed.cc
+++ b/sql/event_timed.cc
@@ -1061,6 +1061,7 @@ event_timed::get_create_event(THD *thd, String *buf)
RETURNS
0 success
+ -99 No rights on this.dbname.str
-100 event in execution (parallel execution is impossible)
others retcodes of sp_head::execute_procedure()
*/
@@ -1089,16 +1090,12 @@ event_timed::execute(THD *thd, MEM_ROOT *mem_root)
if (!sphead && (ret= compile(thd, mem_root)))
goto done;
- thd->db= dbname.str;
- thd->db_length= dbname.length;
-
DBUG_PRINT("info", ("master_access=%d db_access=%d",
thd->security_ctx->master_access, thd->security_ctx->db_access));
change_security_context(thd, &save_ctx);
DBUG_PRINT("info", ("master_access=%d db_access=%d",
thd->security_ctx->master_access, thd->security_ctx->db_access));
-// if (mysql_change_db(thd, dbname.str, 0))
- if (!check_access(thd, EVENT_ACL,dbname.str, 0, 0, 0,is_schema_db(dbname.str)))
+ if (mysql_change_db(thd, dbname.str, 0))
{
List<Item> empty_item_list;
empty_item_list.empty();
@@ -1113,7 +1110,6 @@ event_timed::execute(THD *thd, MEM_ROOT *mem_root)
restore_security_context(thd, save_ctx);
DBUG_PRINT("info", ("master_access=%d db_access=%d",
thd->security_ctx->master_access, thd->security_ctx->db_access));
- thd->db= 0;
VOID(pthread_mutex_lock(&this->LOCK_running));
running= false;