1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +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

@@ -999,3 +999,27 @@ drop view v2;
drop view v0;
drop view v1;
drop table t1;
#
# BUG#14554 - mysqldump does not separate words "ROW" and "BEGIN"
# for tables with trigger created in the IGNORE_SPACE sql mode.
#
SET @old_sql_mode = @@SQL_MODE;
SET SQL_MODE = IGNORE_SPACE;
CREATE TABLE t1 (a INT);
DELIMITER |;
CREATE TRIGGER tr1 BEFORE INSERT ON t1
FOR EACH ROW
BEGIN
SET new.a = 0;
END|
DELIMITER ;|
SET SQL_MODE = @old_sql_mode;
--exec $MYSQL_DUMP --skip-comments --databases test
DROP TRIGGER tr1;
DROP TABLE t1;