From 4aa363b0d2c5e38ad04b0c7409538c4fc13e3b2c Mon Sep 17 00:00:00 2001 From: Bernhard Amann Date: Thu, 17 Oct 2013 14:47:15 -0700 Subject: [PATCH] add check that the SQLite reader is only used in MANUAL reading mode --- src/input/readers/SQLite.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/input/readers/SQLite.cc b/src/input/readers/SQLite.cc index eff34593d8..d02cc17fc7 100644 --- a/src/input/readers/SQLite.cc +++ b/src/input/readers/SQLite.cc @@ -54,7 +54,7 @@ void SQLite::DoClose() } } -bool SQLite::checkError( int code ) +bool SQLite::checkError(int code) { if ( code != SQLITE_OK && code != SQLITE_DONE ) { @@ -73,6 +73,12 @@ bool SQLite::DoInit(const ReaderInfo& info, int arg_num_fields, const threading: return false; } + if ( Info().mode != MODE_MANUAL ) + { + Error("SQLite only supports manual reading mode."); + return false; + } + started = false; string fullpath(info.source);