mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
Fix for embedded
This commit is contained in:
parent
5c53cb39dd
commit
bf40ab8cb1
1 changed files with 6 additions and 0 deletions
|
@ -3770,6 +3770,7 @@ create_error:
|
||||||
lex->unit.cleanup();
|
lex->unit.cleanup();
|
||||||
delete lex->sphead;
|
delete lex->sphead;
|
||||||
lex->sphead= 0;
|
lex->sphead= 0;
|
||||||
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||||
/* only add privileges if really neccessary */
|
/* only add privileges if really neccessary */
|
||||||
if (sp_automatic_privileges &&
|
if (sp_automatic_privileges &&
|
||||||
check_procedure_access(thd, DEFAULT_CREATE_PROC_ACLS,
|
check_procedure_access(thd, DEFAULT_CREATE_PROC_ACLS,
|
||||||
|
@ -3781,6 +3782,7 @@ create_error:
|
||||||
ER_PROC_AUTO_GRANT_FAIL,
|
ER_PROC_AUTO_GRANT_FAIL,
|
||||||
ER(ER_PROC_AUTO_GRANT_FAIL));
|
ER(ER_PROC_AUTO_GRANT_FAIL));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
send_ok(thd);
|
send_ok(thd);
|
||||||
break;
|
break;
|
||||||
case SP_WRITE_ROW_FAILED:
|
case SP_WRITE_ROW_FAILED:
|
||||||
|
@ -3956,6 +3958,7 @@ create_error:
|
||||||
name= thd->strdup(sp->m_name.str);
|
name= thd->strdup(sp->m_name.str);
|
||||||
if (check_procedure_access(thd, ALTER_PROC_ACL, db, name, 0))
|
if (check_procedure_access(thd, ALTER_PROC_ACL, db, name, 0))
|
||||||
goto error;
|
goto error;
|
||||||
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||||
if (sp_automatic_privileges &&
|
if (sp_automatic_privileges &&
|
||||||
sp_revoke_privileges(thd, db, name))
|
sp_revoke_privileges(thd, db, name))
|
||||||
{
|
{
|
||||||
|
@ -3963,6 +3966,7 @@ create_error:
|
||||||
ER_PROC_AUTO_REVOKE_FAIL,
|
ER_PROC_AUTO_REVOKE_FAIL,
|
||||||
ER(ER_PROC_AUTO_REVOKE_FAIL));
|
ER(ER_PROC_AUTO_REVOKE_FAIL));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (lex->sql_command == SQLCOM_DROP_PROCEDURE)
|
if (lex->sql_command == SQLCOM_DROP_PROCEDURE)
|
||||||
result= sp_drop_procedure(thd, lex->spname);
|
result= sp_drop_procedure(thd, lex->spname);
|
||||||
else
|
else
|
||||||
|
@ -4383,8 +4387,10 @@ check_procedure_access(THD *thd, ulong want_access,char *db, char *name,
|
||||||
0, no_errors))
|
0, no_errors))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||||
if (grant_option)
|
if (grant_option)
|
||||||
return check_grant_procedure(thd, want_access, tables, no_errors);
|
return check_grant_procedure(thd, want_access, tables, no_errors);
|
||||||
|
#endif
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue