1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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.
This commit is contained in:
tnurnberg@mysql.com
2006-05-30 14:49:05 +02:00
parent 15f763af84
commit c7ae355d89
3 changed files with 42 additions and 1 deletions

View File

@@ -1143,3 +1143,16 @@ show create procedure p;
drop function f;
drop procedure p;
#
# Bug #17371 Unable to dump a schema with invalid views
#
#
create table t1 ( id serial );
create view v1 as select * from t1;
drop table t1;
# mysqldump gets 1356 from server, but gives us 2
--echo mysqldump {
--error 2
--exec $MYSQL_DUMP --force -N --compact --skip-comments test
--echo } mysqldump
drop view v1;