Report double-quoted string literals in SQL statements
This defines a system property `debug.sqlite.no_double_quoted_strs`
that controls if double-quoted string literals are accepted in SQL
statements. Set the property to 1 to treat double-quoted string
literals as an error. Exceptions will be thrown. Set the property to
0 to accept double-quoted strings in compatibility mode.
The default value is 0, which is the legacy Android behavior.
See the following link for a discussion of the issue:
https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted
A developer can set the property to determine if an application has
syntax errors.
This does not change the default behavior of an Android system.
This change does not fix the bug. It only provides debugging to help
address the bug.
Tested by setting the property to true and verifying that exceptions
are thrown with the error "no such column". The tests below are run
with the property not set (the default condition).
Flag: EXEMPT bug-fix
Bug: 364625688
Test: atest
* FrameworksCoreTests:android.database
* CtsDatabaseTestCases
Change-Id: Ie4c4337995f85caa9432645b75b3cd13db873e1b
4 files changed