Question on 'SQL' tracing

Martin Evans <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Organization Easysoft Limited
Message-ID <[email protected]>
After seeing the recent posting by Greg Sabino Mullane in subject "Log 
DBI query and values with placeholders" I realised there was something 
else DBD::ODBC was out of date with - tracing.

DBD::ODBC does not implement its own trace flags but neither does it 
react to 'SQL' tracing. If I set trace('SQL') I can see the TraceLevel 
is set to 256 and I can find:

     sub parse_trace_flag {
         my ($h, $name) = @_;
         #      0xddDDDDrL (driver, DBI, reserved, Level)
         return 0x00000100 if $name eq 'SQL';
         return;
     }

in DBI. So to test if 'SQL' is enabled we:

if *DBIc_TRACE_LEVEL(imp_xxh) & 256) {blah;}

Is that correct? No constant I am missing?

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.