Some low-importance ovsqlite polish

Bo Lindbergh <[email protected]> Wed, 21 Jan 2026 12:28:25 +0100
Newsgroups gmane.network.inn
Message-ID <[email protected]>
--Apple-Mail=_E8447F89-EE09-4094-B196-DEF635E726DF
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii

The future-proofing is mostly hypothetical.

/Bo Lindbergh

--Apple-Mail=_E8447F89-EE09-4094-B196-DEF635E726DF
Content-Disposition: attachment;
	filename=0001-Explicit-SQLite-init-shutdown.patch
Content-Type: application/octet-stream;
	x-unix-mode=0600;
	name="0001-Explicit-SQLite-init-shutdown.patch"
Content-Transfer-Encoding: quoted-printable

=46rom=206d394063522affa7a0c0367d52459dba5aa3da47=20Mon=20Sep=2017=20=
00:00:00=202001=0AFrom:=20Bo=20Lindbergh=20<[email protected]>=0ADate:=20=
Wed,=2021=20Jan=202026=2011:47:15=20+0100=0ASubject:=20[PATCH]=20=
Explicit=20SQLite=20init/shutdown=0A=0AThe=20SQLite=20docs[1]=20say=20=
that=20implicit=20initialization=20might=20go=20away=0Aat=20some=20=
point,=20so=20add=20explicit=20initialization.=0A=0AAlso,=20explicit=20=
shutdown=20might=20reduce=20the=20number=20of=20false=20positives=0A=
reported=20by=20memory=20leak=20detectors.=0A=0A[1]=20=
https://www.sqlite.org/c3ref/initialize.html=0A---=0A=20=
storage/ovsqlite/ovsqlite-server.c=20|=204=20++++=0A=201=20file=20=
changed,=204=20insertions(+)=0A=0Adiff=20--git=20=
a/storage/ovsqlite/ovsqlite-server.c=20=
b/storage/ovsqlite/ovsqlite-server.c=0Aindex=20e78ae61f3..d797f6ab4=20=
100644=0A---=20a/storage/ovsqlite/ovsqlite-server.c=0A+++=20=
b/storage/ovsqlite/ovsqlite-server.c=0A@@=20-547,6=20+547,9=20@@=20=
open_db(void)=0A=20=20=20=20=20bool=20init;=0A=20=20=20=20=20char=20=
sqltext[64];=0A=20=0A+=20=20=20=20status=20=3D=20sqlite3_initialize();=0A=
+=20=20=20=20if=20(status=20!=3D=20SQLITE_OK)=0A+=20=20=20=20=20=20=20=20=
die("SQLite3=20initialization=20failed");=0A=20=20=20=20=20path=20=3D=20=
concatpath(innconf->pathoverview,=20OVSQLITE_DB_FILE);=0A=20=20=20=20=20=
init=20=3D=20stat(path,=20&sb)=20=3D=3D=20-1;=0A=20=20=20=20=20if=20=
(init)=20{=0A@@=20-663,6=20+666,7=20@@=20close_db(void)=0A=20=20=20=20=20=
sqlite_helper_term(&sql_main_helper,=20(sqlite3_stmt=20**)=20&sql_main);=0A=
=20=20=20=20=20sqlite3_close_v2(connection);=0A=20=20=20=20=20connection=20=
=3D=20NULL;=0A+=20=20=20=20sqlite3_shutdown();=0A=20#=20=20=20=20ifdef=20=
HAVE_ZLIB=0A=20=20=20=20=20if=20(use_compression)=20{=0A=20=20=20=20=20=20=
=20=20=20inflateEnd(&inflation);=0A--=20=0A2.29.0=0A=0A=

--Apple-Mail=_E8447F89-EE09-4094-B196-DEF635E726DF
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-- 
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers

--Apple-Mail=_E8447F89-EE09-4094-B196-DEF635E726DF--