Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 7bde276a9f58a9d50aa392696bf396b01b8f2fb1
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon May 20 14:51:03 2019
Move temp_store and recursive_triggers PRAGMA out of a transaction.
There is no defined behaviour on how PRAGMAs behave inside a
transaction, specifically if they are rolled-back or not, but there are
restrictions on certain PRAGMAs such as temp_store that shouldn't be
performed inside a transaction. Therefore move out of a transaction
the PRAGMAs executed by the InvalidationTracker.
Bug: 132602198
Test: InvalidationTrackerTest
Change-Id: I5f1402a822114dbb4121b197cb9565a31566ef7d
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/InvalidationTrackerTest.java
M room/runtime/src/main/java/androidx/room/InvalidationTracker.java
https://android-review.googlesource.com/965474
https://goto.google.com/android-sha1/7bde276a9f58a9d50aa392696bf396b01b8f2fb1
Branch: androidx-master-dev
commit 7bde276a9f58a9d50aa392696bf396b01b8f2fb1
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon May 20 14:51:03 2019
Move temp_store and recursive_triggers PRAGMA out of a transaction.
There is no defined behaviour on how PRAGMAs behave inside a
transaction, specifically if they are rolled-back or not, but there are
restrictions on certain PRAGMAs such as temp_store that shouldn't be
performed inside a transaction. Therefore move out of a transaction
the PRAGMAs executed by the InvalidationTracker.
Bug: 132602198
Test: InvalidationTrackerTest
Change-Id: I5f1402a822114dbb4121b197cb9565a31566ef7d
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/InvalidationTrackerTest.java
M room/runtime/src/main/java/androidx/room/InvalidationTracker.java
Description
Version used: 2.0.0
Devices/Android versions reproduced on: SDK 28
We occasionally get a crash from sqlite because something is attempting to set PRAGMA temp_store inside of a transaction. This is not allowed (
We have worked around this by setting this exact PRAGMA in onConfigure, so that when Room goes to do it, there is no change and therefore doesn't validate sqlite's precondition.
It would be great if Room could update to not set this PRAGMA inside of a transaction.
Thanks for your help/consideration!