diff options
author | unknown <aivanov@mysql.com> | 2005-11-21 13:36:48 +0300 |
---|---|---|
committer | unknown <aivanov@mysql.com> | 2005-11-21 13:36:48 +0300 |
commit | 3ecbc8e66e843d0dcffccd8a21a5ad409bd84ba3 (patch) | |
tree | a8ce80739b2e9bb6b6ba033e51aaf5e1e4ff7e96 /client | |
parent | 32e6e6aac6520dca9af8b6e00a49f25c2f2a4d73 (diff) | |
download | mariadb-git-3ecbc8e66e843d0dcffccd8a21a5ad409bd84ba3.tar.gz |
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.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqldump.c | 3 |
1 files changed, 2 insertions, 1 deletions
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)) |