Skip to content
Snippets Groups Projects
Commit 8f884ac9 authored by Marco De Marco's avatar Marco De Marco
Browse files

Last second protection in metadata retrieve query

parent e8c33c7a
No related branches found
No related tags found
No related merge requests found
...@@ -143,7 +143,9 @@ DBManager::RowsetSP DBManager::retrieveNewTuples(std::string schema, ...@@ -143,7 +143,9 @@ DBManager::RowsetSP DBManager::retrieveNewTuples(std::string schema,
RowsetSP rows(new soci::rowset<soci::row>(session.prepare << "select * from " RowsetSP rows(new soci::rowset<soci::row>(session.prepare << "select * from "
<< schema << "." << table << " where update_time>'" << schema << "." << table << " where update_time>'"
<< boost::posix_time::to_iso_string(timestamp) << "' order by update_time asc")); << boost::posix_time::to_iso_string(timestamp)
<< "' and update_time<=DATE_SUB(now(), INTERVAL 1 SECOND)"
<< " order by update_time asc"));
return rows; return rows;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment