mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fix for bug #12280 "Triggers: crash if flush tables".
We should not allow FLUSH statement to be executed inside both triggers and stored functions.
This commit is contained in:
@@ -6395,6 +6395,13 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
|
||||
bool result=0;
|
||||
select_errors=0; /* Write if more errors */
|
||||
bool tmp_write_to_binlog= 1;
|
||||
|
||||
if (thd->in_sub_stmt)
|
||||
{
|
||||
my_error(ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0), "FLUSH");
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
if (options & REFRESH_GRANT)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user