open database with -newline set to NULL
This commit is contained in:
parent
a6cd3f15e6
commit
7310c1180a
@ -6,7 +6,8 @@ openDatabase() {
|
|||||||
[[ -f "$database" ]] || populate_db=1
|
[[ -f "$database" ]] || populate_db=1
|
||||||
rm -f "$tempdir"/sqlite.{in,out}
|
rm -f "$tempdir"/sqlite.{in,out}
|
||||||
mkfifo "$tempdir"/sqlite.{in,out}
|
mkfifo "$tempdir"/sqlite.{in,out}
|
||||||
sqlite3 -bail "$database" \
|
sqlite3 -bail -newline $'\0' \
|
||||||
|
"$database" \
|
||||||
< "$tempdir/sqlite.in" \
|
< "$tempdir/sqlite.in" \
|
||||||
> "$tempdir/sqlite.out" &
|
> "$tempdir/sqlite.out" &
|
||||||
db_pid=$!
|
db_pid=$!
|
||||||
@ -24,7 +25,7 @@ openDatabase() {
|
|||||||
echo 'PRAGMA recursive_triggers = ON;' >&3
|
echo 'PRAGMA recursive_triggers = ON;' >&3
|
||||||
echo 'PRAGMA temp_store = 2;' >&3
|
echo 'PRAGMA temp_store = 2;' >&3
|
||||||
echo 'PRAGMA locking_mode = EXCLUSIVE;' >&3
|
echo 'PRAGMA locking_mode = EXCLUSIVE;' >&3
|
||||||
read -u4
|
read -u4 -d $'\0'
|
||||||
unset REPLY
|
unset REPLY
|
||||||
checkDatabaseVersion
|
checkDatabaseVersion
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user