From 14b7402a1506f1c9d5cd2319525efcfabe9a58c2 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 --- 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 3152b4bf7e7..4864c166570 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;";