Check the return code with SQLITE_OK.

Signed-off-by: Thiago Farina <tfarina@chromium.org>