From a1abdbe38a6f45ab765486e29f89649d614037ee Mon Sep 17 00:00:00 2001 From: D3Hunter Date: Tue, 19 Jul 2022 19:37:08 +0800 Subject: [PATCH] br: more i t for restore priv table (#36330) ref pingcap/tidb#35395 --- br/tests/br_full_cluster_restore/run.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/br/tests/br_full_cluster_restore/run.sh b/br/tests/br_full_cluster_restore/run.sh index 257bce42f73d3..7587bd2b9775a 100644 --- a/br/tests/br_full_cluster_restore/run.sh +++ b/br/tests/br_full_cluster_restore/run.sh @@ -48,13 +48,20 @@ run_br restore full --log-file $br_log_file --filter '*.*' --filter '!mysql.*' - run_sql "select count(*) from db2.t1" check_contains "count(*): 2" -echo "--> incompatible system table: column count mismatch" +echo "--> incompatible system table: more column on target cluster" restart_services # mock incompatible manually run_sql "alter table mysql.user add column xx int;" run_br restore full --log-file $br_log_file -s "local://$backup_dir" > $res_file 2>&1 || true check_contains "the target cluster is not compatible with the backup data" +echo "--> incompatible system table: less column on target cluster" +restart_services +# mock incompatible manually +run_sql "alter table mysql.user drop column Reload_priv" +run_br restore full --log-file $br_log_file -s "local://$backup_dir" > $res_file 2>&1 || true +check_contains "the target cluster is not compatible with the backup data" + echo "--> incompatible system table: column type incompatible" restart_services # mock incompatible manually