From 7bd3185370d395fc6ba3c26fdb46f591bd17cfea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gonz=C3=A1lez?= Date: Wed, 23 Sep 2020 16:51:26 +0200 Subject: [PATCH] B #5072: Make HookLog compatible with every DB backend (#241) --- src/hm/HookLog.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hm/HookLog.cc b/src/hm/HookLog.cc index c4e696355c..9c29dcb967 100644 --- a/src/hm/HookLog.cc +++ b/src/hm/HookLog.cc @@ -156,7 +156,7 @@ int HookLog::add(int hkid, int hkrc, std::string &xml_result) cb.set_callback(&query_output); - oss << "SELECT IFNULL(MAX(exeid), -1), COUNT(*) FROM hook_log" << " WHERE hkid = " << hkid; + oss << "SELECT coalesce(MAX(exeid), -1), COUNT(*) FROM " << one_db::hook_log_table << " WHERE hkid = " << hkid; int rc = db->exec_rd(oss, &cb);