From f1ca6e83d7fa2da1c45845465903f6ad35b8884d Mon Sep 17 00:00:00 2001 From: cschantz Date: Fri, 27 Feb 2026 19:13:19 -0500 Subject: [PATCH] Add missing explicit returns to 2 more functions - stop_second_instance (line 1851) - Added return 0 before closing brace - detect_recovery_level_from_errors (line 1076) - Added return 0 after echo Both functions had no explicit return statements. While these don't cause immediate exit-to-terminal like the step functions, they violate best practice of always having explicit returns. Severity: HIGH Impact: Consistency and future-proofing Co-Authored-By: Claude Haiku 4.5 --- modules/backup/mysql-restore-to-sql.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/backup/mysql-restore-to-sql.sh b/modules/backup/mysql-restore-to-sql.sh index 05f03a1..c6ce437 100755 --- a/modules/backup/mysql-restore-to-sql.sh +++ b/modules/backup/mysql-restore-to-sql.sh @@ -1072,6 +1072,7 @@ detect_recovery_level_from_errors() { fi echo "$recommended_level|$error_type" + return 0 } # Check error log for InnoDB startup issues (returns error type) @@ -1847,6 +1848,7 @@ stop_second_instance() { # Mark as no longer running SECOND_INSTANCE_RUNNING=0 + return 0 } # Validate SQL dump integrity