1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +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:
dlenev@mysql.com
2005-08-10 10:31:32 +04:00
parent 069fb89bb9
commit 51537c057d
7 changed files with 57 additions and 9 deletions

View File

@@ -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)
{