diff options
| author | 2018-07-16 10:43:43 -0600 | |
|---|---|---|
| committer | 2018-07-16 10:44:15 -0600 | |
| commit | bba22006d692bda68e489068f51277efe087850f (patch) | |
| tree | bd4ccaa191bd574935978b9b72fc398d4b773e3d | |
| parent | 162d77170967d1871e0fd11924a016b20c7908c6 (diff) | |
GROUP BY and HAVING aren't ready to be strict.
Despite SQLite documentation saying these clauses follow the "expr"
syntax, queries will fail with obscure "row value misused" errors,
so remove the strict enforcement for now.
Test: manual
Bug: 111480817
Change-Id: Ib8cdcb4e6456110589203189fcfa14e75cd68718
| -rw-r--r-- | core/java/android/database/sqlite/SQLiteQueryBuilder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/database/sqlite/SQLiteQueryBuilder.java b/core/java/android/database/sqlite/SQLiteQueryBuilder.java index 31907717c168..5c528870d138 100644 --- a/core/java/android/database/sqlite/SQLiteQueryBuilder.java +++ b/core/java/android/database/sqlite/SQLiteQueryBuilder.java @@ -549,8 +549,8 @@ public class SQLiteQueryBuilder { // "expr" inside that need to be validated final String sql = buildQuery(projection, wrap(queryArgs.getString(QUERY_ARG_SQL_SELECTION)), - wrap(queryArgs.getString(QUERY_ARG_SQL_GROUP_BY)), - wrap(queryArgs.getString(QUERY_ARG_SQL_HAVING)), + queryArgs.getString(QUERY_ARG_SQL_GROUP_BY), + queryArgs.getString(QUERY_ARG_SQL_HAVING), queryArgs.getString(QUERY_ARG_SQL_SORT_ORDER), queryArgs.getString(QUERY_ARG_SQL_LIMIT)); db.validateSql(sql, cancellationSignal); // will throw if query is invalid |