On 10/02/11 22:27, Greg Sabino Mullane wrote: > >> Trace level is no good to get DBD only tracing since level >> 1 and 2 is for DBI and anything after that is DBD. > > Yes, sorry about that, I was being lazy in my comingling of > trace levels and trace flags. > >> In addition, at the LPW speaking to Tim I mentioned I had >> implemented some trace flags in DBD::ODBC which were probably >> generic in nature and agreed to add them to DBI. > > +1 > >> Whilst I was there I thought I could sort the trace DBD only >> issue out as well by adding a DBD trace flag. > ... >> $dbh->trace('DBD'); > ... >> Which is now duplicated in DBI for all DBDs. >> I didn't realise you did that and although I can see >> why it means you've added a flag with an uppercase >> name which is reserved for DBI. I'm not sure you'll >> ever see DBD in your parse_trace_flags after 1.617 >> so you'll need to do something similar to what I >> did (below) in addition to keeping what you already >> have (above) to cover older DBIs before 1.617. > > Okay, all that is good to know. So it should do > the same thing post 1.617 and the dbd::pg specific > code will never fire, right? > > ...
yup, if you OR your DBD flag with DBDs DBD flag nothing will change for you. If someone uses pre 1.617 you will work as before and 1.617 you will continue to work but your flag will be redundant. When you eventually raise your requirement to DBI 1.617 you can take your DBD flag out. >> The ENC flag is for encoding tracing. > > Thanks for the explanation there, as well as all the others I > did not quote here. > BTW, on your comment to Merijn re dbd_verbose reinventing the wheel. That is how I felt and I did not want to add another test to all my trace tests which is why I added the DBD flag instead. I'm not criticising anyone using dbd_verbose, I just did not want to do it that way and would rather work with what was already present in DBI. Martin -- Martin J. Evans Easysoft Limited http://www.easysoft.com