[odb-users] Accessing bind vars from tracer

David Hinson dhinson at netrogenblue.com
Wed Mar 19 15:54:28 EDT 2014

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?



More information about the odb-users mailing list