summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Lee Shombert <shombert@google.com> 2023-09-11 16:02:34 -0700
committer Lee Shombert <shombert@google.com> 2023-09-12 13:30:20 -0700
commitd27f3177bafa9d28ffb2d2bf813c1361615a3ec0 (patch)
treef82257e3e233e96138bc0fdf3956f8bb3c852ee0 /libs/androidfw/StringPool.cpp
parent4c0797b1f5609c246441985bf93c90841e46ecb2 (diff)
Improve SQL statement type guesses
Bug: 277114870 This improves the function that guesses at the SQL statement type. An internal function gives finer grained guesses. These guesses are not part of the public API. The new guesses: 1. CREATE - a table create statement (maps to public DDL) 2. COMMENT - a leading comment (maps to public OTHER) 3. WITH - a leading with statement (e.g., CTE) (maps to public OTHER) The finer grained guess is used in one place. 'WITH' statements are cached in the prepared statement cache. This is correct behavior because a 'WITH' statement is always either a STATEMENT_SELECT or STATEMENT_UPDATED as well, and these are both cached. Unit tests for the new statement type guesser have been added. There will not be any CTS tests because the new function is internal. Also, a concurrency test has been added to verify that read-only statements with comments are correctly assigned to non-primary database connections and therefore can run in parallel with read/write statements. Test: atest * FrameworksCoreTests:android.database * CtsDatabaseTestCases Change-Id: Icfd16a60c9ebf2291bd6a4a76d03495eb01e34e9
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions