Fixed
Status Update
Comments
da...@google.com <da...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit ae96cd9781755d01bcb4b60fc9ed0115d193e133
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed May 01 10:17:49 2019
Use single quotes for room_master_table hash INSERT statement.
Starting in SQLite 3.27.0, usage of double quotes shows a warning
which might surface as an error due to double quotes usage as a
string literal. Avoid having Room cause such warning by using single
quotes when inserting the DB hash.
For more info see:https://www.sqlite.org/quirks.html#dblquote
Bug: 131712640
Test: ./gradlew room:room-compiler:test
Change-Id: Icb54a7b592bf8ea7f15dd35f0f556c3f3d9ac2e9
M room/common/src/main/java/androidx/room/RoomMasterTable.java
M room/compiler/src/test/data/databasewriter/output/ComplexDatabase.java
https://android-review.googlesource.com/954783
https://goto.google.com/android-sha1/ae96cd9781755d01bcb4b60fc9ed0115d193e133
Branch: androidx-master-dev
commit ae96cd9781755d01bcb4b60fc9ed0115d193e133
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed May 01 10:17:49 2019
Use single quotes for room_master_table hash INSERT statement.
Starting in SQLite 3.27.0, usage of double quotes shows a warning
which might surface as an error due to double quotes usage as a
string literal. Avoid having Room cause such warning by using single
quotes when inserting the DB hash.
For more info see:
Bug: 131712640
Test: ./gradlew room:room-compiler:test
Change-Id: Icb54a7b592bf8ea7f15dd35f0f556c3f3d9ac2e9
M room/common/src/main/java/androidx/room/RoomMasterTable.java
M room/compiler/src/test/data/databasewriter/output/ComplexDatabase.java
Description
Version used: 2.0.0
Devices/Android versions reproduced on: Nexus S / API 28
Room generates a migration, and at the end it has a line that looks like this:
_db.execSQL("INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(SOME_NUMBER, \"LONG_STRING\")");
LONG_STRING is wrapped in double quotes, but it should be wrapped in single quotes. This will avoid generating the error in modern sqlite versions.