diff --git a/src/pool/PoolSQL.cc b/src/pool/PoolSQL.cc index 0c796b1ef0..e2ba4a0e8e 100644 --- a/src/pool/PoolSQL.cc +++ b/src/pool/PoolSQL.cc @@ -158,7 +158,14 @@ void PoolSQL::exist(const string& id_str, std::set& id_list) std::vector 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();) {