Bug #10378 ndb_restore doesn't remove newly INSERTed rows
Submitted: 5 May 2005 9:29 Modified: 5 May 2005 11:53
Reporter: Jan Kneschke Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:4.1.11 OS:Linux (Linux/x86)
Assigned to: Jonas Oreland CPU Architecture:Any

[5 May 2005 9:29] Jan Kneschke
Description:
Rows INSERTed after a backup are not removed after the backup is restore into a running cluster.

This was tested with a simple 2node setup on one computer with 2 replicas.

[NDB_MGM]
...

[NDBD DEFAULT]
NoOfReplicas=2
DataDirectory=/var/lib/mysql-cluster/local/

[NDBD]

[NDBD]

How to repeat:
A simple table of the style:

CREATE TABLE tbl1 ( id int primary key ) engine = ndb;

with some data:

INSERT INTO tbl1 VALUES ( 1 ), ( 2 ), ( 3 );

is backuped with

START BACKUP

in the ndb_mgm client.

INSERT INTO tbl1 VALUES ( 25 );

to insert a new row.

ndb_restore to restore the backup above and the entry '25' persists.

$ ndb_restore --backupid=1 --nodeid=3 --restore-data /var/lib/mysql-cluster/local/BACKUP/BACKUP-1

$ ndb_restore --backupid=1 --nodeid=2 --restore-data /var/lib/mysql-cluster/local/BACKUP/BACKUP-1

Suggested fix:
the restored backup should really reflect the backuped state.
[5 May 2005 11:53] Jonas Oreland
One should make an initial restart before restoring a backup.
Any other behavior and your on you own.

Note: the feature that your asking could still be implemented.
But that's a new feature.

Maybe this should be mentioned in the docs...