From 89a1db2bd228965707645ba346519b824f7a48e9 Mon Sep 17 00:00:00 2001 From: Chad MILLER Date: Mon, 9 Mar 2009 16:58:47 -0400 Subject: Bug#42635: mysqldump includes views that were excluded using the \ --ignore-table option mysqldump would correctly omit temporary tables for views, but would incorrectly still emit all CREATE VIEW statements. Backport a fix from 5.1, where we capture the names we want to emit views for in one pass (the placeholder tables) and in the pass where we actually emit the views, we don't emit a view if it wasn't in that list. --- mysql-test/t/mysqldump.test | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mysql-test/t/mysqldump.test') diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 5cd9c17e2ac..30a7da751e8 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1649,6 +1649,20 @@ DROP TABLE t1,t2; # We reset concurrent_inserts value to whatever it was at the start of the test SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT; +--echo # +--echo # Bug #42635: mysqldump includes views that were excluded using +--echo # the --ignore-table option +--echo # + +create database db42635; +use db42635; +create table t1 (id int); +create view db42635.v1 (c) as select * from db42635.t1; +create view db42635.v2 (c) as select * from db42635.t1; +--exec $MYSQL_DUMP --skip-comments --ignore-table=db42635.v1 db42635 +use test; +drop database db42635; + --echo # --echo # End of 5.0 tests -- cgit v1.2.1