import-trace: sanity-check code deduplication

Change-Id: I098981dfe93d760e3a423a374be05dbad3ee9cc1
This commit is contained in:
Horst Schirmeier
2014-11-07 11:16:45 +01:00
parent 2f59d802fa
commit d30ffdd3e5
2 changed files with 33 additions and 32 deletions

View File

@ -113,6 +113,11 @@ protected:
*/
virtual bool trace_end_reached() { return true; }
/**
* Executes an SQL statement, assumes a sanity check failure if it returns
* any result rows, and provides some diagnostics.
*/
bool sanitycheck(std::string check_name, std::string fail_msg, std::string sql);
public:
Importer() : m_sanitychecks(false), m_import_write_ecs(true), m_extended_trace(false), m_row_count(0), m_time_trace_start(0) {}
bool init(const std::string &variant, const std::string &benchmark, fail::Database *db);