Don't crash if innodb_lock_wait_timeout doesn't exist.

This commit is contained in:
Daniel Nichter
2012-05-04 10:09:50 -06:00
parent bc058d6daf
commit 3ebf357a1f
3 changed files with 88 additions and 7 deletions

View File

@@ -6015,7 +6015,11 @@ sub main {
PTDEBUG && _d($dbh, $sql);
my (undef, $curr_lwt) = $dbh->selectrow_array($sql);
PTDEBUG && _d('innodb_lock_wait_timeout on server:', $curr_lwt);
if ( $curr_lwt > $lock_wait_timeout ) {
if ( !$curr_lwt ) {
PTDEBUG && _d('innodb_lock_wait_timeout does not exist;',
'InnoDB is probably disabled');
}
elsif ( $curr_lwt > $lock_wait_timeout ) {
warn "Failed to $set_lwt: $EVAL_ERROR\n"
. "The current innodb_lock_wait_timeout value "
. "$curr_lwt is greater than the --lock-wait-timeout "