Replace MKDEBUG with PTDEBUG in modules.

This commit is contained in:
Daniel Nichter
2012-01-19 12:46:56 -07:00
parent 97f42e9c07
commit 88304e69fb
83 changed files with 1234 additions and 1234 deletions

View File

@@ -25,7 +25,7 @@ package KeySize;
use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
use constant MKDEBUG => $ENV{MKDEBUG} || 0;
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
sub new {
my ( $class, %args ) = @_;
@@ -65,7 +65,7 @@ sub get_key_size {
}
my $key_exists = $self->_key_exists(%args);
MKDEBUG && _d('Key', $name, 'exists in', $args{tbl_name}, ':',
PTDEBUG && _d('Key', $name, 'exists in', $args{tbl_name}, ':',
$key_exists ? 'yes': 'no');
# Construct a SQL statement with WHERE conditions on all key
@@ -94,7 +94,7 @@ sub get_key_size {
}
$sql .= join(' OR ', @where_cols);
$self->{query} = $sql;
MKDEBUG && _d('sql:', $sql);
PTDEBUG && _d('sql:', $sql);
my $explain;
my $sth = $dbh->prepare($sql);
@@ -110,7 +110,7 @@ sub get_key_size {
my $key_len = $explain->{key_len};
my $rows = $explain->{rows};
my $chosen_key = $explain->{key}; # May differ from $name
MKDEBUG && _d('MySQL chose key:', $chosen_key, 'len:', $key_len,
PTDEBUG && _d('MySQL chose key:', $chosen_key, 'len:', $key_len,
'rows:', $rows);
my $key_size = 0;