1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge bk-internal:/home/bk/mysql-5.0-runtime

into  mysql.com:/home/jimw/my/mysql-5.0-18005


sql/sql_trigger.cc:
  Auto merged
This commit is contained in:
unknown
2006-06-28 10:55:27 -07:00
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);