Check if innodb_lock_wait_timeout exists, don't crash.

This commit is contained in:
Daniel Nichter
2012-05-16 17:36:19 -06:00
parent 603a47d04f
commit 6d0e207af7
3 changed files with 67 additions and 3 deletions

View File

@@ -5030,7 +5030,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 ( !defined $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 "