Author: mjevans
Date: Sun Feb 6 06:30:20 2011
New Revision: 14687
Modified:
dbi/trunk/Changes
dbi/trunk/DBI.pm
dbi/trunk/DBI.xs
dbi/trunk/t/09trace.t
Log:
Extend 09trace.t to test ENC, CON, TXN and DBD trace flags
Add TXN to parse_trace_flags
Add the DBIf constants to the ALIAS in connect - but not sure what this achieves
Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes (original)
+++ dbi/trunk/Changes Sun Feb 6 06:30:20 2011
@@ -12,7 +12,7 @@
people doing DBI->{Attrib}.
Fixed the definition of ArrayTupleStatus and remove confusion over
rows affected in list context of execute_array (Martin J. Evans)
- Added CON, ENC and DBD trace flags (Martin J. Evans)
+ Added CON, ENC and DBD trace flags and extended 09trace.t (Martin J. Evans)
Added TXN trace flags and applied CON and TXN to relevant methods (Tim Bunce)
Enhanced and standardized driver trace level mechanism (Tim Bunce)
Modified: dbi/trunk/DBI.pm
==============================================================================
--- dbi/trunk/DBI.pm (original)
+++ dbi/trunk/DBI.pm Sun Feb 6 06:30:20 2011
@@ -1419,6 +1419,7 @@
return 0x00000200 if $name eq 'CON';
return 0x00000400 if $name eq 'ENC';
return 0x00000800 if $name eq 'DBD';
+ return 0x00001000 if $name eq 'TXN';
return;
}
@@ -7605,11 +7606,12 @@
SQL - trace SQL statements executed
(not yet implemented in DBI but implemented in some DBDs)
CON - trace connection process
- (not yet implemented in DBI but implemented in some DBDs)
ENC - trace encoding (unicode translations etc)
(not yet implemented in DBI but implemented in some DBDs)
DBD - trace only DBD messages
(not implemented by all DBDs yet)
+ TXN - trace transactions
+ (not implemented in all DBDs yet)
The L</parse_trace_flags> and L</parse_trace_flag> methods are used
to convert trace flag names into the corresponding integer bit flags.
Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs (original)
+++ dbi/trunk/DBI.xs Sun Feb 6 06:30:20 2011
@@ -4232,6 +4232,11 @@
DBIpp_st_XX = DBIpp_st_XX
DBIstcf_DISCARD_STRING = DBIstcf_DISCARD_STRING
DBIstcf_STRICT = DBIstcf_STRICT
+ DBIf_TRACE_SQL = DBIf_TRACE_SQL
+ DBIf_TRACE_CON = DBIf_TRACE_CON
+ DBIf_TRACE_ENC = DBIf_TRACE_ENC
+ DBIf_TRACE_DBD = DBIf_TRACE_DBD
+ DBIf_TRACE_TXN = DBIf_TRACE_TXN
CODE:
RETVAL = ix;
OUTPUT:
Modified: dbi/trunk/t/09trace.t
==============================================================================
--- dbi/trunk/t/09trace.t (original)
+++ dbi/trunk/t/09trace.t Sun Feb 6 06:30:20 2011
@@ -3,7 +3,7 @@
use strict;
-use Test::More tests => 67;
+use Test::More tests => 99;
## ----------------------------------------------------------------------------
## 09trace.t
@@ -60,6 +60,10 @@
my @names = qw(
SQL
+ CON
+ ENC
+ DBD
+ TXN
foo bar baz boo bop
);
my %flag;