1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix for bug #17866 "Problem with renaming table with triggers with fully

qualified subject table" which was introduced during work on bug #13525
"Rename table does not keep info of triggers".

The bug was caused by the fact that during reconstruction of CREATE TRIGGER
statement stored in .TRG file which happened during RENAME TABLE we damaged
trigger definition in case when it contained fully qualified name of subject
table (see comment for sql_yacc.yy for more info).
This commit is contained in:
dlenev@mysql.com
2006-03-04 16:55:06 +03:00
parent e5e1760292
commit efe0900669
4 changed files with 30 additions and 19 deletions

View File

@ -1217,6 +1217,7 @@ Table_triggers_list::change_table_name_in_triggers(THD *thd,
buff.append(def->str, before_on_len);
buff.append(STRING_WITH_LEN("ON "));
append_identifier(thd, &buff, new_table_name->str, new_table_name->length);
buff.append(STRING_WITH_LEN(" "));
on_q_table_name_len= buff.length() - before_on_len;
buff.append(on_table_name->str + on_table_name->length,
def->length - (before_on_len + on_table_name->length));