[odb-users] Accessing bind vars from tracer

David Hinson dhinson at netrogenblue.com
Wed Mar 19 16:12:23 EDT 2014


Disregard and apologies.  I just found the odb::mysql::statement::handle()
accessor which I missed the first time around.

-----Original Message-----
From: odb-users-bounces at codesynthesis.com
[mailto:odb-users-bounces at codesynthesis.com] On Behalf Of David Hinson
Sent: Wednesday, March 19, 2014 3:54 PM
To: odb-users at codesynthesis.com
Subject: [odb-users] Accessing bind vars from tracer

Hello, odb::tracer is useful for programmatically accessing select
statements for app logging and it would be even more useful if I could log
the values of the bind vars of those select statements as well.  I'm aware
of the pitfalls of monkeying with tracer and I'm willing to accept the
risks.  However my efforts are immediately thwarted by the fact that the
auto_handle for MYSQL_STMT in odb::mysql::statement is declared protected,
preventing my odb::tracer::execute() code from accessing the MySQL bind var
info through a downcasted odb::statement.  Since accessing bind var values
along with their select statement seems like a perfectly reasonable thing to
do I'm concluding this is an intentional roadblock.  If that is the case
then what is the recommended way of accessing bind var values from a tracer?

 

Regards

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3462 / Virus Database: 3705/7155 - Release Date: 03/05/14
Internal Virus Database is out of date.



More information about the odb-users mailing list