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

Fixed BUG #14554: mysqldump does not separate "ROW" and trigger

statement for tables created in the IGNORE_SPACE sql mode.


client/mysqldump.c:
  Modified dump_triggers_for_table(): if trigger statement returned
   by SHOW TRIGGERS query does not contain a leading white space,
   additional space is inserted between "ROW" and the statement.
   The leading white spaces are removed by yylex() in the
   IGNORE_SPACE sql mode.
mysql-test/r/mysqldump.result:
  Fixed test case result for bug 14554.
mysql-test/t/mysqldump.test:
  Added test case for bug 14554.
This commit is contained in:
unknown
2005-11-21 13:36:48 +03:00
parent 32e6e6aac6
commit 3ecbc8e66e
3 changed files with 82 additions and 1 deletions

View File

@ -1841,12 +1841,13 @@ DELIMITER ;;\n");
while ((row= mysql_fetch_row(result)))
{
fprintf(sql_file, "/*!50003 SET SESSION SQL_MODE=\"%s\" */;;\n\
/*!50003 CREATE TRIGGER %s %s %s ON %s FOR EACH ROW%s */;;\n\n",
/*!50003 CREATE TRIGGER %s %s %s ON %s FOR EACH ROW%s%s */;;\n\n",
row[6], /* sql_mode */
quote_name(row[0], name_buff, 0), /* Trigger */
row[4], /* Timing */
row[1], /* Event */
result_table,
(strchr(" \t\n\r", *(row[3]))) ? "" : " ",
row[3] /* Statement */);
}
if (mysql_num_rows(result))