mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-27 07:54:58 +00:00
Merge pt-osc-pxc-tests.
This commit is contained in:
@@ -97,6 +97,7 @@ sub new {
|
||||
: join(', ', map { $q->quote($_) } @cols))
|
||||
. " FROM $tbl->{name}"
|
||||
. ($where ? " WHERE $where" : '')
|
||||
. ($args{lock_in_share_mode} ? " LOCK IN SHARE MODE" : "")
|
||||
. " /*$comments{bite}*/";
|
||||
PTDEBUG && _d('One nibble statement:', $nibble_sql);
|
||||
|
||||
@@ -106,6 +107,7 @@ sub new {
|
||||
: join(', ', map { $q->quote($_) } @cols))
|
||||
. " FROM $tbl->{name}"
|
||||
. ($where ? " WHERE $where" : '')
|
||||
. ($args{lock_in_share_mode} ? " LOCK IN SHARE MODE" : "")
|
||||
. " /*explain $comments{bite}*/";
|
||||
PTDEBUG && _d('Explain one nibble statement:', $explain_nibble_sql);
|
||||
|
||||
@@ -210,6 +212,7 @@ sub new {
|
||||
. " AND " . $asc->{boundaries}->{'<='} # upper boundary
|
||||
. ($where ? " AND ($where)" : '')
|
||||
. ($args{order_by} ? " ORDER BY $order_by" : "")
|
||||
. ($args{lock_in_share_mode} ? " LOCK IN SHARE MODE" : "")
|
||||
. " /*$comments{nibble}*/";
|
||||
PTDEBUG && _d('Nibble statement:', $nibble_sql);
|
||||
|
||||
@@ -222,6 +225,7 @@ sub new {
|
||||
. " AND " . $asc->{boundaries}->{'<='} # upper boundary
|
||||
. ($where ? " AND ($where)" : '')
|
||||
. ($args{order_by} ? " ORDER BY $order_by" : "")
|
||||
. ($args{lock_in_share_mode} ? " LOCK IN SHARE MODE" : "")
|
||||
. " /*explain $comments{nibble}*/";
|
||||
PTDEBUG && _d('Explain nibble statement:', $explain_nibble_sql);
|
||||
|
||||
|
@@ -135,11 +135,12 @@ sub get_dbh_for {
|
||||
my $dbh;
|
||||
# This is primarily for the benefit of CompareResults, but it's
|
||||
# also quite convenient when using an affected OS
|
||||
# TODO: this fails if the server isn't started yet.
|
||||
$cxn_ops->{L} = 1 if !exists $cxn_ops->{L}
|
||||
&& !$self->can_load_data('master');
|
||||
eval { $dbh = $dp->get_dbh($dp->get_cxn_params($dsn), $cxn_ops) };
|
||||
if ( $EVAL_ERROR ) {
|
||||
die 'Failed to get dbh for' . $server . ': ' . $EVAL_ERROR;
|
||||
die 'Failed to get dbh for ' . $server . ': ' . $EVAL_ERROR;
|
||||
}
|
||||
$dbh->{InactiveDestroy} = 1; # Prevent destroying on fork.
|
||||
$dbh->{FetchHashKeyName} = 'NAME_lc' unless $cxn_ops && $cxn_ops->{no_lc};
|
||||
|
Reference in New Issue
Block a user