From: bert hubert Date: Sat, 15 Sep 2018 14:25:39 +0000 (+0200) Subject: Enhance query-logging with timing for MySQL, PostgreSQL and SQLite X-Git-Tag: dnsdist-1.3.3~92^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16c2f740821811e3d87e21c989aff3cc8fa1bb58;p=thirdparty%2Fpdns.git Enhance query-logging with timing for MySQL, PostgreSQL and SQLite --- diff --git a/modules/gmysqlbackend/smysql.cc b/modules/gmysqlbackend/smysql.cc index 67ccac095b..1d851daa91 100644 --- a/modules/gmysqlbackend/smysql.cc +++ b/modules/gmysqlbackend/smysql.cc @@ -162,7 +162,8 @@ public: if (!d_stmt) return this; if (d_dolog) { - g_log<inTransaction(); // try only once while(attempts < 2 && (d_rc = sqlite3_step(d_stmt)) == SQLITE_BUSY) attempts++; @@ -89,9 +91,16 @@ public: throw SSqlException(string("CANTOPEN error in sqlite3, often caused by unwritable sqlite3 db *directory*: ")+string(sqlite3_errmsg(d_db->db()))); throw SSqlException(string("Error while retrieving SQLite query results: ")+string(sqlite3_errmsg(d_db->db()))); } + if(d_dolog) + g_log<