diff options
author | unknown <anozdrin@mysql.com> | 2006-03-02 16:23:42 +0300 |
---|---|---|
committer | unknown <anozdrin@mysql.com> | 2006-03-02 16:23:42 +0300 |
commit | 3dd927cf1cf4f666d55144862e52e9479fe6c4ff (patch) | |
tree | 33170eaa871a9cf14c3c81c821c260709dcd5d69 /sql/sp_head.cc | |
parent | 9a1fed13eec0fec9ac84e70ceade04372a93b64d (diff) | |
download | mariadb-git-3dd927cf1cf4f666d55144862e52e9479fe6c4ff.tar.gz |
Fix for BUG#13198: SP executes if definer does not exist.
Basically, this fix contains a test case and removing of a workaround
for replication. This fix became possible after pushing WL#2897
(Complete definer support in stored routines).
mysql-test/r/sp-security.result:
Updated the result file to contain results of test for BUG#13198.
mysql-test/t/sp-security.test:
Added a test case for BUG#13198.
sql/sp_head.cc:
Removed the workaround for replication, since WL#2897 is pushed and
now definer attribute/clause is fully supported in stored routines.
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index b8b7ee2f78b..c0b566f9b9b 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -3171,24 +3171,9 @@ sp_change_security_context(THD *thd, sp_head *sp, Security_context **backup) sp->m_definer_host.str, sp->m_db.str)) { -#ifdef NOT_YET_REPLICATION_SAFE - /* - Until we don't properly replicate information about stored routine - definer with stored routine creation statement all stored routines - on slave are created under ''@'' definer. Therefore we won't be able - to run any routine which was replicated from master on slave server - if we emit error here. This will cause big problems for users - who use slave for fail-over. So until we fully implement WL#2897 - "Complete definer support in the stored routines" we run suid - stored routines for which we were unable to find definer under - invoker security context. - */ my_error(ER_NO_SUCH_USER, MYF(0), sp->m_definer_user.str, sp->m_definer_host.str); return TRUE; -#else - return FALSE; -#endif } *backup= thd->security_ctx; thd->security_ctx= &sp->m_security_ctx; |