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

B #5400: Fix PoolSQL::exist (#1224)

This commit is contained in:
Pavel Czerný 2021-05-18 18:49:08 +02:00 committed by Ruben S. Montero
parent fd03c0b5ed
commit 0f110b2a36
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -158,7 +158,14 @@ void PoolSQL::exist(const string& id_str, std::set<int>& id_list)
std::vector<int> existing_items;
one_util::split_unique(id_str, ',', id_list);
search(existing_items, table.c_str(), "true order by 1 ASC");
if (Nebula::instance().get_db_backend() == "postgresql")
{
search(existing_items, table.c_str(), "true order by 1 ASC");
}
else
{
search(existing_items, table.c_str(), "1 order by 1 ASC");
}
for (auto iterator = id_list.begin(); iterator != id_list.end();)
{