From 3ecbc8e66e843d0dcffccd8a21a5ad409bd84ba3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 21 Nov 2005 13:36:48 +0300 Subject: 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. --- client/mysqldump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/mysqldump.c b/client/mysqldump.c index b92b971ea4f..c6a57959d6d 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -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)) -- cgit v1.2.1