From 0932290696562e751522ec56d111ae1768f356ab Mon Sep 17 00:00:00 2001 From: arg7 <64158631+arg7@users.noreply.github.com> Date: Wed, 23 Sep 2020 16:55:58 +0200 Subject: [PATCH] B #5081: oned monitoring API bug with PostgreSQL (#5087) Signed-off-by: Romanov Andrey Grigorievich Co-authored-by: Romanov Andrey Grigorievich (cherry picked from commit c9d360d6f51c51a41bc62d01bb7f88c7c048588b) --- src/vm/VirtualMachinePool.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vm/VirtualMachinePool.cc b/src/vm/VirtualMachinePool.cc index 3152b4bf7e..4864c16657 100644 --- a/src/vm/VirtualMachinePool.cc +++ b/src/vm/VirtualMachinePool.cc @@ -340,12 +340,11 @@ int VirtualMachinePool::dump_monitoring( cmd << "SELECT " << one_db::vm_monitor_table << ".body FROM " << one_db::vm_monitor_table - << " INNER JOIN " << one_db::vm_table - << " WHERE vmid = oid"; + << " INNER JOIN " << one_db::vm_table << " ON vmid = oid"; if ( !where.empty() ) { - cmd << " AND " << where; + cmd << " WHERE " << where; } cmd << " ORDER BY vmid, " << one_db::vm_monitor_table << ".last_poll;";