From c7ae355d89b5d0d85175403a26addea338736f50 Mon Sep 17 00:00:00 2001 From: "tnurnberg@mysql.com" <> Date: Tue, 30 May 2006 14:49:05 +0200 Subject: Bug#17371: Unable to dump a schema with invalid views 'show create' works even on views that are short of a base-table (this throw a warning though, like you would expect). Unfortunately, this is not what mysqldump uses; it creates stand-in tables and hence requests 'show fields' on the view which fails with missing base-tables. The --force option prevents the dump from stopping at this point; furthermore this patch dumps a comment showing create for the offending view for better diagnostics. This solution was confirmed by submitter as solving their/clients' problem. Problem might become non-issue once mysqldump no longer creates stand-in tables. --- mysql-test/r/mysqldump.result | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysql-test/r/mysqldump.result') diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 467e0818646..94c9c4f9007 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -2731,3 +2731,12 @@ p CREATE DEFINER=`root`@`localhost` PROCEDURE `p`() select 42 drop function f; drop procedure p; +create table t1 ( id serial ); +create view v1 as select * from t1; +drop table t1; +mysqldump { + +-- failed on view `v1`: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`id` AS `id` from `t1` + +} mysqldump +drop view v1; -- cgit v1.2.1