Bug #36471 Default driver should not backup NDB tables
Submitted: 2 May 2008 12:29 Modified: 29 Jun 2009 0:14
Reporter: Chuck Bell Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Backup Severity:S4 (Feature request)
Version:6.0.5 OS:Any
Assigned to: Chuck Bell CPU Architecture:Any

[2 May 2008 12:29] Chuck Bell
Description:
The MySQL backup can backup NDB using the default driver. The default driver should refuse NDB tables. There is an existing NDB backup command that is much more suited to backup NDB. Users should use that facility until NDB and MySQL backup can be made to work together.

How to repeat:
N/A

Suggested fix:
Change the default driver to refuse NDB tables in it's accept() method:

    switch (h->db_type) {
    case DB_TYPE_MRG_MYISAM:
    case DB_TYPE_BLACKHOLE_DB:
    case DB_TYPE_FEDERATED_DB:
    case DB_TYPE_EXAMPLE_DB:
    case DB_TYPE_NDBCLUSTER:   // Do not accept NDB tables
      accepted= FALSE;
      break;
    }
    return (accepted);
[2 May 2008 20:09] Sveta Smirnova
Thank you for the report.
[7 May 2009 7:29] Lars Thalmann
DECISION: NDB tables should be ignored and not be included 
in the backup for now.

On Tue, Apr 28, 2009 at 10:19:13AM +0200, Bernhard Ocklin wrote:
> Basically you can do what you want as we do not yet support cluster in
> 6.0. But if this will be the case in the future just use B: ignore NDB
> tables.
[7 May 2009 21:37] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/73616

2807 Hema Sridharan	2009-05-07
      WL#4834(Test ndb and backup)
      New test case ndb_backup.test is included in ndb suite.
      Note that this test will not satisfy BUG#43604 and BUG#36471
      Once these bugs are fixed backup will use consistent snapshot drivers
      for NDB / NDBCLUSTER storage engine.
      added:
        mysql-test/suite/ndb/r/ndb_backup.result
        mysql-test/suite/ndb/t/ndb_backup.test
[2 Jun 2009 18:11] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/75480

2820 Chuck Bell	2009-06-02
      BUG#36471 : Default driver should not backup NDB tables
      
      It has been decided MySQL Backup should not backup NDB tables and that if
      an NDB table is included in a backup, the backup should fail. 
      
      This patch ensures MySQL Backup cannot be used to backup NDB tables. A
      specific error message is produced encouraging the user to refer to the 
      Cluster reference manual. 
      added:
        mysql-test/suite/ndb/r/backup_no_ndb.result
        mysql-test/suite/ndb/t/backup_no_ndb.cnf
        mysql-test/suite/ndb/t/backup_no_ndb.test
      modified:
        sql/backup/backup_info.cc
        sql/share/errmsg.txt
[2 Jun 2009 18:16] Chuck Bell
A decision has been made:

MySQL Backup will throw an error and stop if a NDB table is detected at backup time.
[3 Jun 2009 20:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/75556

2821 Chuck Bell	2009-06-03
      BUG#36471 : Default driver should not backup NDB tables
      
      It has been decided MySQL Backup should not backup NDB tables and that if
      an NDB table is included in a backup, the backup should fail. 
       
      This patch ensures MySQL Backup cannot be used to backup NDB tables. A
      specific error message is produced encouraging the user to refer to the 
      Cluster reference manual.
      added:
        mysql-test/suite/ndb/r/backup_no_ndb.result
        mysql-test/suite/ndb/t/backup_no_ndb.cnf
        mysql-test/suite/ndb/t/backup_no_ndb.test
      modified:
        sql/backup/backup_info.cc
        sql/share/errmsg.txt
[3 Jun 2009 20:55] Hema Sridharan
Thanks for creating new patch. Patch approved. Good to push
[25 Jun 2009 14:39] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090625143727-9gqcfzh7ajuk66oj) (version source revid:charles.bell@sun.com-20090603202931-10hssymlbgfmnjr4) (merge vers: 5.4.4-alpha) (pib:11)
[29 Jun 2009 0:14] Paul DuBois
No changelog entry needed. Not in any released version.