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] MySQL Verification Team
Thank you for the bug report.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.