From bf40ab8cb1c129a2da1ae92f1c5ff2fd296ad962 Mon Sep 17 00:00:00 2001 From: "acurtis@pcgem.rdg.cyberkinetica.com" <> Date: Thu, 23 Dec 2004 11:42:57 +0000 Subject: [PATCH] Fix for embedded --- sql/sql_parse.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 80639e06f5f..1e232f064ba 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3770,6 +3770,7 @@ mysql_execute_command(THD *thd) lex->unit.cleanup(); delete lex->sphead; lex->sphead= 0; +#ifndef NO_EMBEDDED_ACCESS_CHECKS /* only add privileges if really neccessary */ if (sp_automatic_privileges && check_procedure_access(thd, DEFAULT_CREATE_PROC_ACLS, @@ -3781,6 +3782,7 @@ mysql_execute_command(THD *thd) ER_PROC_AUTO_GRANT_FAIL, ER(ER_PROC_AUTO_GRANT_FAIL)); } +#endif send_ok(thd); break; case SP_WRITE_ROW_FAILED: @@ -3956,6 +3958,7 @@ mysql_execute_command(THD *thd) name= thd->strdup(sp->m_name.str); if (check_procedure_access(thd, ALTER_PROC_ACL, db, name, 0)) goto error; +#ifndef NO_EMBEDDED_ACCESS_CHECKS if (sp_automatic_privileges && sp_revoke_privileges(thd, db, name)) { @@ -3963,6 +3966,7 @@ mysql_execute_command(THD *thd) ER_PROC_AUTO_REVOKE_FAIL, ER(ER_PROC_AUTO_REVOKE_FAIL)); } +#endif if (lex->sql_command == SQLCOM_DROP_PROCEDURE) result= sp_drop_procedure(thd, lex->spname); else @@ -4383,8 +4387,10 @@ check_procedure_access(THD *thd, ulong want_access,char *db, char *name, 0, no_errors)) return TRUE; +#ifndef NO_EMBEDDED_ACCESS_CHECKS if (grant_option) return check_grant_procedure(thd, want_access, tables, no_errors); +#endif return FALSE; } -- 2.30.9