Sqlite compatibility

Bug: 65896
Change-Id: I98366c3e8ff8615bb7462c594ca1a8b97ba5a42b
(cherry picked from commit 3fa071a1e690920ae64b22d49f4d40c11ddc6131)