pingcap/tidb

Do not allow br full restore if table structure exists

Open

#32.615 geöffnet am 24. Feb. 2022

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (6.186 Forks)batch import
component/brhelp wantedtype/feature-request

Repository-Metriken

Stars
 (40.090 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 14T 4h) (346 gemergte PRs in 30 T)

Beschreibung

Feature Request

Is your feature request related to a problem? Please describe:

Currently, when trying to br restore a table after run query "delete from t1;" and "truncate table t1;" is different:

CREATE TABLE `t1` (`a` int(11) NOT NULL,  PRIMARY KEY (`a`));
insert into t1 values (1), (2);
br backup t1;
delete from t1;
restore t1 => BR:Restore:ErrRestoreChecksumMismatch
CREATE TABLE `t1` (`a` int(11) NOT NULL,  PRIMARY KEY (`a`));
insert into t1 values (1), (2);
br backup t1;
truncate table t1;
restore t1 => Success

Describe the feature you'd like:

After execute query "delete from t1;" or "truncate table t1; br restore should not allow user to restore to the table t1, as table structure still exists in this cases.

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

Contributor Guide