6e4df51501
The check_innodb_errors() function was using an overly broad error pattern "\[ERROR\].*InnoDB" that matched warnings about missing tables in OTHER databases, triggering premature shutdown even when the selected database was healthy. Changes: 1. Refactored check_innodb_errors() to accept optional database name parameter 2. Split error patterns into CRITICAL (always fail) and DATABASE_SPECIFIC - Critical errors: memory, plugin init, redo log corruption (always fail) - Database-specific errors: only fail if they mention the selected database 3. Removed the too-broad "\[ERROR\].*InnoDB" pattern 4. Updated both calls to check_innodb_errors() to pass DATABASE_NAME This allows the script to: - Succeed when other databases have issues (as they should be ignored) - Only fail for actual problems with the selected database - Properly attempt dump creation on the second instance Fixes the 2-second gap between "ready for connections" and unexpected shutdown. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>