d5870de836
- Apply proper shutdown validation to pre-startup cleanup (line 881-899) If a stale socket exists, wait for it to be removed instead of just sleeping 2 seconds. Uses same pattern as stop_second_instance(). - Apply proper shutdown validation to error path (line 937-960) When InnoDB errors are detected, use validated shutdown with socket removal verification instead of fire-and-forget mysqladmin call. - All 4 shutdown paths now consistently: 1. Send graceful shutdown 2. Wait for socket file to disappear 3. Clean up stale socket/lock files 4. Verify process termination This ensures no stale processes/sockets remain that could cause crashes on subsequent script runs. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>