diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-07-12 11:57:47 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-07-12 11:57:47 +0400 |
commit | 7c3df72d0a627aa6c12af14d57b2664af7f8b380 (patch) | |
tree | 9653ac4cee54b8e8a0210023c7abfe5f00ec4fb4 /sql/event_data_objects.cc | |
parent | 31b35118490357063047755d849ab4c8687ce938 (diff) | |
download | mariadb-git-7c3df72d0a627aa6c12af14d57b2664af7f8b380.tar.gz |
MDEV-13298 Change sp_head::m_chistics from a pointer to a structure
Diffstat (limited to 'sql/event_data_objects.cc')
-rw-r--r-- | sql/event_data_objects.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index 86bdadabc17..2ab06fb34f2 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1426,7 +1426,13 @@ Event_job_data::execute(THD *thd, bool drop) sphead->m_flags|= sp_head::LOG_SLOW_STATEMENTS; sphead->m_flags|= sp_head::LOG_GENERAL_LOG; - sphead->set_info(0, 0, &thd->lex->sp_chistics, sql_mode); + /* + construct_sp_sql() + parse_sql() set suid to SP_IS_NOT_SUID, + because we have the security context already set to the event + definer here. See more comments in construct_sp_sql(). + */ + DBUG_ASSERT(sphead->suid() == SP_IS_NOT_SUID); + sphead->m_sql_mode= sql_mode; sphead->set_creation_ctx(creation_ctx); sphead->optimize(); |