mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
A cleanup for MDEV-13415 Wrap the code in sp.cc into a class Sp_handler
Fixing mysql_execute_command() and store_schema_proc() not to use stored object type codes TYPE_ENUM_PROCEDURE and TYPE_ENUM_FUNCTION. Using pointers to Sp_handler instead, to make the code symmetric across existing (function,procedure) and future (e.g package) SP object types.
This commit is contained in:
@@ -5405,11 +5405,10 @@ end_with_restore_list:
|
||||
}
|
||||
if (first_table)
|
||||
{
|
||||
if (lex->type == TYPE_ENUM_PROCEDURE ||
|
||||
lex->type == TYPE_ENUM_FUNCTION)
|
||||
const Sp_handler *sph= Sp_handler::handler((stored_procedure_type)
|
||||
lex->type);
|
||||
if (sph)
|
||||
{
|
||||
const Sp_handler *sph= Sp_handler::handler((stored_procedure_type)
|
||||
lex->type);
|
||||
uint grants= lex->all_privileges
|
||||
? (PROC_ACLS & ~GRANT_ACL) | (lex->grant & GRANT_ACL)
|
||||
: lex->grant;
|
||||
|
||||
Reference in New Issue
Block a user