Commit 320bd58d authored by unknown's avatar unknown

Merge gleb.loc:/home/uchum/work/bk/5.0-opt

into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/t/mysqldump.test:
  Auto merged
client/mysqldump.c:
  Null merge of bug #29788.
mysql-test/r/mysqldump.result:
  Merge with 5.0-opt.
parents 68c1aeb2 1cc751a0
......@@ -3573,6 +3573,28 @@ SELECT * FROM v1;
1
DROP VIEW v1;
#
# Bug #29788: mysqldump discards the NO_AUTO_VALUE_ON_ZERO value of
# the SQL_MODE variable after the dumping of triggers.
#
CREATE TABLE t1 (c1 INT);
CREATE TRIGGER t1bd BEFORE DELETE ON t1 FOR EACH ROW BEGIN END;
CREATE TABLE t2 (c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SET @TMP_SQL_MODE = @@SQL_MODE;
SET SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO';
INSERT INTO t2 VALUES (0), (1), (2);
SET SQL_MODE = @TMP_SQL_MODE;
SELECT * FROM t2;
c1
0
1
2
SELECT * FROM t2;
c1
0
1
2
DROP TABLE t1,t2;
#
# End of 5.0 tests
#
drop table if exists t1;
......
......@@ -1554,6 +1554,28 @@ DROP VIEW v1;
SELECT * FROM v1;
DROP VIEW v1;
--echo #
--echo # Bug #29788: mysqldump discards the NO_AUTO_VALUE_ON_ZERO value of
--echo # the SQL_MODE variable after the dumping of triggers.
--echo #
CREATE TABLE t1 (c1 INT);
CREATE TRIGGER t1bd BEFORE DELETE ON t1 FOR EACH ROW BEGIN END;
CREATE TABLE t2 (c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
SET @TMP_SQL_MODE = @@SQL_MODE;
SET SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO';
INSERT INTO t2 VALUES (0), (1), (2);
SET SQL_MODE = @TMP_SQL_MODE;
SELECT * FROM t2;
--exec $MYSQL_DUMP --routines test >$MYSQLTEST_VARDIR/tmp/bug29788.sql
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug29788.sql
SELECT * FROM t2;
DROP TABLE t1,t2;
--echo #
--echo # End of 5.0 tests
--echo #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment