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

(cherry picked from commit 5267d9d712)
This commit is contained in:
Pavel Czerný authored and Ruben S. Montero committed 2021-05-18 18:50:06 +02:00
1 parent bbc8bb1bab
commit fe07a94d3e
1 file changed
+8 -1
+8 -1
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();)
{