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
This commit is contained in:
Jeff Sharkey
2018-07-16 10:43:43 -06:00
parent 162d771709
commit bba22006d6

View File

@@ -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