Bug #45251 Backup fails if base table is missing for views

Submitted: 1 Jun 2009 22:07 Modified: 2 Jun 2009 5:25
Reporter: Hema Sridharan Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:mysql-6.0-backup, mysql-6.0 OS:Linux
Assigned to: CPU Architecture:Any

[1 Jun 2009 22:07] Hema Sridharan
Description:
create database db2;
create table db2.t2(id int);
create view db2.v2 as select * from db2.t2;
backup database db2 to 'db2a.bak';
drop table db2.t2;
backup database db2 to 'db2b.bak';

At this point backup will fail because of missing base table.

How to repeat:
mysql> create database db2;
Query OK, 1 row affected (0.00 sec)

mysql> create table db2.t2(id int);
Query OK, 0 rows affected (0.00 sec)

mysql> create view db2.v2 as select * from db2.t2;
Query OK, 0 rows affected (0.00 sec)

mysql> backup database db2 to 'db2a.bak';
+-----------+
| backup_id |
+-----------+
| 273       |
+-----------+
1 row in set (0.08 sec)

mysql> drop table db2.t2;
Query OK, 0 rows affected (0.00 sec)

mysql> backup database db2 to 'db2b.bak';
ERROR 1698 (HY000): Failed to add view `db2`.`v2` to the catalog

Please see BUG#34902. The fix for this bug is only partly done. In future, we should be able to backup databases even if dependencies of objects are missing.
[2 Jun 2009 5:25] Sveta Smirnova
Thank you for the report.

It is actually duplicate of bug #44283

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

Page generated in 0.038 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.