Bug #79711 mysqldbexport --all does not support views referencing external databases.
Submitted: 20 Dec 2015 10:21 Modified: 22 Dec 2015 15:34
Reporter: Roberto Polli Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Utilities Severity:S3 (Non-critical)
Version:1.6 OS:Any
Assigned to: CPU Architecture:Any
Tags: mysqldbexport, Views

[20 Dec 2015 10:21] Roberto Polli
Description:
The customer is using mysqldbexport to provision new slaves and it does not work.

The database has views referencing external tables.

How to repeat:
To reproduce:

mysql <<< "
create database a;
create view a.v as select * from b.t;
create database b;
create table b.t (i int);
"

mysqldbexport --all > dump.sql
mysqldbimport dump.sql

Suggested fix:
mysqldbexport --all should mimic the behavior of mysqldump:

 1. creating temporary tables for the views;
 2. modifying those tables at the end of the file.
[22 Dec 2015 0:09] Roberto Polli
I propose the following fix for the issue.

https://github.com/mysql/mysql-utilities/pull/5

The patch just mimic mysqldump behavior and is implemented for the sql mode only.

Let me know,
R
[22 Dec 2015 15:34] Miguel Solorzano
Thank you for the bug report.