Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 10279986f24d1648952e740ea38c72b7bc44fdc7
Author: Elif Bilgin <elifbilgin@google.com>
Date: Tue Oct 26 16:59:42 2021
Resolving auto migration issue where SQLite keywords are failed to be escaped in column names.
The issue was arising from the part of AutoMigrationWriter generating code to transfer data from the old table to the new table, preserving the order of the columns. The SQL statement used did not utilize `` to escape the column names, resulting in a compiler error in scenarios where a SQLite keyword was being used as a column name.
Issue was repro'd in the tests by using the column name "index" and confirming the escape is working as expected with the new changes.
Test: AutoMigrationTest.java
Bug: 197133152
Change-Id: Idbed488acb2027fb1c0d9c302d1cc83ed5bfba2c
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/AutoMigrationDb.java
M room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.AutoMigrationDb/1.json
https://android-review.googlesource.com/1870037
Branch: androidx-main
commit 10279986f24d1648952e740ea38c72b7bc44fdc7
Author: Elif Bilgin <elifbilgin@google.com>
Date: Tue Oct 26 16:59:42 2021
Resolving auto migration issue where SQLite keywords are failed to be escaped in column names.
The issue was arising from the part of AutoMigrationWriter generating code to transfer data from the old table to the new table, preserving the order of the columns. The SQL statement used did not utilize `` to escape the column names, resulting in a compiler error in scenarios where a SQLite keyword was being used as a column name.
Issue was repro'd in the tests by using the column name "index" and confirming the escape is working as expected with the new changes.
Test: AutoMigrationTest.java
Bug: 197133152
Change-Id: Idbed488acb2027fb1c0d9c302d1cc83ed5bfba2c
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/AutoMigrationDb.java
M room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.AutoMigrationDb/1.json
Description
Component used: SavedState
Version used: 1.1.0
When unconditionally calls even if there are no components that were registered to save their state.
SavedStateRegistry
is asked toperformSave
, itputBundle
This means that in cases like Fragments, where the Fragment itself has a
SavedStateRegistry
and the fragment's view has its ownSavedStateRegistry
, the overall saved state is increased doubly so (at what seems like a cost of 0.2KB per fragment).While not a significant part of the total saved state, this can add up with deep stacks.