1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B #5072: Make HookLog compatible with every DB backend (#241)

(cherry picked from commit 7bd3185370d395fc6ba3c26fdb46f591bd17cfea)
This commit is contained in:
Christian González 2020-09-23 16:51:26 +02:00 committed by Ruben S. Montero
parent 2777dc70d3
commit 43edaa94fa
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -164,7 +164,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);