Skip to content

Commit

Permalink
br: more i t for restore priv table (#36330)
Browse files Browse the repository at this point in the history
ref #35395
  • Loading branch information
D3Hunter authored Jul 19, 2022
1 parent 51b8884 commit a1abdbe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion br/tests/br_full_cluster_restore/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a1abdbe

Please sign in to comment.