mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
start adding a different text for empty records for the sqlite writer.
Sadly there also seems to be another deadlock issue which I am currently not really able to figure out - on shutdown sometimes (too often) the main thread + all sqlite threads wait for semaphores or mutexes.
This commit is contained in:
parent
8f71186bf7
commit
0fcc3db9a0
10 changed files with 33 additions and 7 deletions
|
@ -30,9 +30,14 @@ SQLite::SQLite(WriterFrontend* frontend) : WriterBackend(frontend)
|
|||
BifConst::LogAscii::unset_field->Len()
|
||||
);
|
||||
|
||||
empty_field.assign(
|
||||
(const char*) BifConst::LogAscii::empty_field->Bytes(),
|
||||
BifConst::LogAscii::empty_field->Len()
|
||||
);
|
||||
|
||||
db = 0;
|
||||
|
||||
io = new AsciiInputOutput(this, AsciiInputOutput::SeparatorInfo(set_separator, unset_field));
|
||||
io = new AsciiInputOutput(this, AsciiInputOutput::SeparatorInfo(set_separator, unset_field, empty_field));
|
||||
}
|
||||
|
||||
SQLite::~SQLite()
|
||||
|
@ -134,7 +139,7 @@ bool SQLite::DoInit(const WriterInfo& info, int num_fields,
|
|||
&db,
|
||||
SQLITE_OPEN_READWRITE |
|
||||
SQLITE_OPEN_CREATE |
|
||||
SQLITE_OPEN_FULLMUTEX // perhaps change to nomutex
|
||||
SQLITE_OPEN_NOMUTEX // perhaps change to nomutex
|
||||
,
|
||||
NULL)) )
|
||||
return false;
|
||||
|
|
|
@ -46,9 +46,9 @@ private:
|
|||
sqlite3 *db;
|
||||
sqlite3_stmt *st;
|
||||
|
||||
string separator;
|
||||
string set_separator;
|
||||
string unset_field;
|
||||
string empty_field;
|
||||
|
||||
AsciiInputOutput* io;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue