Get rid of misleading SCHEMA_INFO error 44/200244/9
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 20 Feb 2019 11:40:21 +0000 (12:40 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Fri, 17 May 2019 08:48:15 +0000 (10:48 +0200)
commit39795557d02a1e2ae0dd5ea2fa7a2085bed329c2
tree9f5009aa1ca10704606a20676857f35d6731dbab
parente7fc5083eeec26de78c7ff9a4dc3e51b18b59958
Get rid of misleading SCHEMA_INFO error

During startup the key-manager attempts to read a table SCHEMA_INFO to get the
information about the database version. In older versions of the database that
table is missing. Key-manager properly handles that case but produces 3 lines of
error log which may suggest that something went wrong.

This commit checks the existence of the table before attempting to use it. Whole
operation is enclosed in a transaction.

Change-Id: Ie7f1fbe1182c2add5965f8e5ddada262ffcb42fe
src/manager/service/db-crypto.cpp
src/manager/service/db-crypto.h