MT#60120 allow SQLite to use aux threads

https://www.sqlite.org/pragma.html#pragma_threads

Change-Id: I025e175b4a9efd299269492a8be34e2d54eb4263
mr12.4
Rene Krenn 2 years ago
parent ad3b6e48f1
commit ab37cf4ea6

@ -5,7 +5,8 @@ use strict;
use NGCP::BulkProcessor::Globals qw(
$local_db_path
$LongReadLen_limit);
$LongReadLen_limit
$cpucount);
use NGCP::BulkProcessor::Logging qw(
getlogger
dbinfo
@ -269,6 +270,10 @@ sub db_connect {
#PRAGMA locking_mode = NORMAL ... by default
#$self->db_do('PRAGMA auto_vacuum = INCREMENTAL');
#$self->db_do('PRAGMA read_uncommitted = ' . $read_uncommitted_isolation_level);
if ($cpucount) {
$self->db_do('PRAGMA threads = ' . $cpucount);
}
if ($local_db_path and ($filemode == $staticdbfilemode or $filemode == $timestampdbfilemode)) {
$self->db_do("PRAGMA temp_store_directory = '$local_db_path'");
}

Loading…
Cancel
Save