1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Bug #18005: Creating a trigger on mysql.event leads to server crash on scheduler startup

Bug #18361: Triggers on mysql.user table cause server crash

 Because they do not work, we do not allow creating triggers on tables
 within the 'mysql' schema.

 (They may be made to work and re-enabled at some later date, but not
 in 5.0 or 5.1.)


mysql-test/r/trigger.result:
  Add new results
mysql-test/t/trigger.test:
  Add new regression test for creating triggers on system schema
sql/share/errmsg.txt:
  Add new error message
sql/sql_trigger.cc:
  Disallow creating triggers on tables in the 'mysql' schema
This commit is contained in:
unknown
2006-06-27 17:16:02 -07:00
parent c3cb46908c
commit 88afd72b47
4 changed files with 46 additions and 1 deletions

View File

@@ -183,6 +183,15 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
!(tables= add_table_for_trigger(thd, thd->lex->spname)))
DBUG_RETURN(TRUE);
/*
We don't allow creating triggers on tables in the 'mysql' schema
*/
if (create && !my_strcasecmp(system_charset_info, "mysql", tables->db))
{
my_error(ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA, MYF(0));
DBUG_RETURN(TRUE);
}
/* We should have only one table in table list. */
DBUG_ASSERT(tables->next_global == 0);