polish: add trap cleanup_restore_rollback to match sibling restore scripts

Final whole-branch review noted alt_mysql_native_backup_restore.sh was the
only one of three consumers of the shared rollback helpers without this
trap, leaving a stale rollback temp file on signal/die().
This commit is contained in:
Marek Miklewicz
2026-07-05 19:21:08 +02:00
parent d0871acb68
commit bb3fae1fa6
@@ -309,6 +309,7 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
[ -r "$COMMON_FILE" ] || die "missing helper: $COMMON_FILE"
# shellcheck source=../setup/mysql_common.sh
source "$COMMON_FILE"
trap cleanup_restore_rollback INT TERM EXIT
mysql_load_plugin_settings_file "$SETTINGS_FILE"
main "$@"
fi