From 57d5d8fe9dc4c0d6b4ef21754c5a3539e4c01cf9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 7 Nov 2011 15:00:06 +0200 Subject: Add support for SQL statement tracing --- odb/mysql/connection.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'odb/mysql/connection.cxx') diff --git a/odb/mysql/connection.cxx b/odb/mysql/connection.cxx index 114ea38..473079d 100644 --- a/odb/mysql/connection.cxx +++ b/odb/mysql/connection.cxx @@ -97,6 +97,17 @@ namespace odb { clear (); + { + odb::tracer* t; + if ((t = transaction_tracer ()) || + (t = tracer ()) || + (t = database ().tracer ())) + { + string str (s, n); + t->execute (*this, str.c_str ()); + } + } + if (mysql_real_query (handle_, s, static_cast (n))) translate_error (*this); -- cgit v1.1