MT#60120 set explicit tempdir for SQlite

huge sqlite databases cause huge tempfiles
(even for SELECT), sometimes too big for
the system's tempfolder.

Change-Id: I7d19b1b30f90d63fdfd41f4c9329708f1584bfc9
(cherry picked from commit ad3b6e48f1)
mr11.5
Rene Krenn 12 months ago
parent 7f905cec58
commit 3e50100eb2

@ -64,7 +64,7 @@ my $texttable_encoding = 'UTF-8'; # sqlite returns whats inserted...
$DBD::SQLite::COLLATION{no_accents} = sub { $DBD::SQLite::COLLATION{no_accents} = sub {
my ( $a, $b ) = map lc, @_; my ( $a, $b ) = map lc, @_;
tr[<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] tr[àâáäåãçðèêéëìîíïñòôóöõøùûúüý]
[aaaaaacdeeeeiiiinoooooouuuuy] for $a, $b; [aaaaaacdeeeeiiiinoooooouuuuy] for $a, $b;
$a cmp $b; $a cmp $b;
}; };
@ -269,6 +269,9 @@ sub db_connect {
#PRAGMA locking_mode = NORMAL ... by default #PRAGMA locking_mode = NORMAL ... by default
#$self->db_do('PRAGMA auto_vacuum = INCREMENTAL'); #$self->db_do('PRAGMA auto_vacuum = INCREMENTAL');
#$self->db_do('PRAGMA read_uncommitted = ' . $read_uncommitted_isolation_level); #$self->db_do('PRAGMA read_uncommitted = ' . $read_uncommitted_isolation_level);
if ($local_db_path and ($filemode == $staticdbfilemode or $filemode == $timestampdbfilemode)) {
$self->db_do("PRAGMA temp_store_directory = '$local_db_path'");
}
dbinfo($self,'connected',getlogger(__PACKAGE__)); dbinfo($self,'connected',getlogger(__PACKAGE__));

Loading…
Cancel
Save