mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mishka.local:/home/my/mysql-5.0
This commit is contained in:
@ -232,7 +232,7 @@ bool Table_triggers_list::create_trigger(THD *thd, TABLE_LIST *tables)
|
||||
|
||||
|
||||
/* Trigger must be in the same schema as target table. */
|
||||
if (my_strcasecmp(system_charset_info, table->s->db,
|
||||
if (my_strcasecmp(table_alias_charset, table->s->db,
|
||||
lex->spname->m_db.str ? lex->spname->m_db.str :
|
||||
thd->db))
|
||||
{
|
||||
@ -408,7 +408,7 @@ bool Table_triggers_list::drop_trigger(THD *thd, TABLE_LIST *tables)
|
||||
it_def++;
|
||||
it_mod++;
|
||||
|
||||
if (my_strcasecmp(system_charset_info, lex->spname->m_name.str,
|
||||
if (my_strcasecmp(table_alias_charset, lex->spname->m_name.str,
|
||||
name->str) == 0)
|
||||
{
|
||||
/*
|
||||
@ -554,8 +554,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
|
||||
|
||||
if ((parser= sql_parse_prepare(&path, &table->mem_root, 1)))
|
||||
{
|
||||
if (!strncmp(triggers_file_type.str, parser->type()->str,
|
||||
parser->type()->length))
|
||||
if (is_equal(&triggers_file_type, parser->type()))
|
||||
{
|
||||
Table_triggers_list *triggers=
|
||||
new (&table->mem_root) Table_triggers_list(table);
|
||||
@ -705,7 +704,7 @@ err_with_lex_cleanup:
|
||||
be merged into .FRM anyway.
|
||||
*/
|
||||
my_error(ER_WRONG_OBJECT, MYF(0),
|
||||
table_name, triggers_file_ext, "TRIGGER");
|
||||
table_name, triggers_file_ext+1, "TRIGGER");
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
@ -787,10 +786,9 @@ static TABLE_LIST *add_table_for_trigger(THD *thd, sp_name *trig)
|
||||
if (!(parser= sql_parse_prepare(&path, thd->mem_root, 1)))
|
||||
DBUG_RETURN(0);
|
||||
|
||||
if (strncmp(trigname_file_type.str, parser->type()->str,
|
||||
parser->type()->length))
|
||||
if (!is_equal(&trigname_file_type, parser->type()))
|
||||
{
|
||||
my_error(ER_WRONG_OBJECT, MYF(0), trig->m_name.str, trigname_file_ext,
|
||||
my_error(ER_WRONG_OBJECT, MYF(0), trig->m_name.str, trigname_file_ext+1,
|
||||
"TRIGGERNAME");
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user