-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLite queries return stale table metadata after alter operation #529
Labels
type:bug
Something isn't working
Comments
JaniruTEC
changed the title
SQLite queries return stale table metadata after update
SQLite queries return stale table metadata after alter operation
Apr 10, 2024
JaniruTEC
added a commit
that referenced
this issue
Apr 10, 2024
Copied from the Android-Issue-153521693 project [2] *This commit is related to issue #529 [1]* [1] #529 [2] https://github.com/SailReal/Android-Issue-153521693/tree/cfb5033cf287572ac4b4972700f1656ce2b61d03/src/androidTest/java/de/skymatic/android_issue153521693
JaniruTEC
added a commit
that referenced
this issue
Apr 13, 2024
Room is designed to choose the journal mode itself if none is specified. greenDAO's journal mode ("TRUNCATE") will stay for now because the journal mode has influence on the behavior caused by issue #529 [1] and because changing the journal mode complicates the migration further. This can still be changed later. *This commit is related to issue #529 [1]* [1] #529
JaniruTEC
added a commit
that referenced
this issue
Apr 13, 2024
Replaced particular implementation of "fix" with call to freshly introduced, user-supplied mapping function (and added "RandomUUIDSQLMappingFunction" as new mapping function with that particular implementation) Replaced "fixCompile" with direct instantiation of "CacheControlledSupportSQLiteStatement" Updated static elements to be inner members of "CacheControlledSupportSQLiteDatabase" (and removed now unnecessary properties) Changed computation logic of "sql" property in "CacheControlledSupportSQLiteQuery" *This commit is related to issue #529 [1]* [1] #529
JaniruTEC
added a commit
that referenced
this issue
Apr 13, 2024
Renamed class "CacheControlledSupportSQLiteDatabase" to "MappingSupportSQLiteDatabase" Renamed class "CacheControlledSupportSQLiteOpenHelper" to "MappingSupportSQLiteOpenHelper" Renamed class "CacheControlledSupportSQLiteOpenHelperFactory" to "MappingSupportSQLiteOpenHelperFactory" Renamed inner class "CacheControlledSupportSQLiteStatement" to "MappingSupportSQLiteStatement" Renamed inner class "CacheControlledSupportSQLiteQuery" to "MappingSupportSQLiteQuery" Renamed method "fix" to "map" in "MappingSupportSQLiteDatabase" Renamed method "fixWhereClause" to "mapWhereClause" in "MappingSupportSQLiteDatabase" Renamed property "identifiers" to "mappedQueries" in "MappingSupportSQLiteQuery" Renamed extension method "SupportSQLiteOpenHelper.Factory.asCacheControlled" to "SupportSQLiteOpenHelper.Factory.asMapped" in "MappingSupportSQLiteDatabase.kt" *This commit is related to issue #529 [1]* [1] #529
JaniruTEC
added a commit
that referenced
this issue
Apr 13, 2024
Moved "RandomUUIDSQLMappingFunction" from "MappingSupportSQLiteDatabase.kt" to new file "SQLiteCacheControl.kt" Added extension function "SupportSQLiteOpenHelper.Factory.asCacheControlled" in "SQLiteCacheControl.kt" as wrapper for "asMapped" with "RandomUUIDSQLMappingFunction" as mapping function Removed "RandomUUIDSQLMappingFunction" as default mapping function from extension function "SupportSQLiteOpenHelper.Factory.asMapped" in "MappingSupportSQLiteDatabase.kt" Replaced call to "asMapped" with call to "asCacheControlled" in "DatabaseModule" *This commit is related to issue #529 [1]* [1] #529
JaniruTEC
added a commit
that referenced
this issue
Sep 25, 2024
Moved WAL initialization from the "onConfigure" methods (via "applyDefaultConfiguration") of the database configurations to the corresponding instances of "SupportSQLiteOpenHelper" Updated extension method "applyDefaultConfiguration" for "SupportSQLiteDatabase" defined in "CryptomatorDatabase.kt" to no longer configure WAL but verify that it has been set properly in the corresponding "SupportSQLiteOpenHelper" *This commit is related to issue #529 [1]* [1] #529
JaniruTEC
added a commit
that referenced
this issue
Sep 25, 2024
Added "@VisibleForTesting" to "MappingSupportSQLiteQuery" and changed its visibility to internal *This commit is related to issue #529 [1]* [1] #529
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please agree to the following
Summary
In rare cases queries to a recently changed table will return stale table metadata (e.g. column names). This might cause difficult to diagnose bugs during database migration. So far this issue hasn't been reported in production, but was encountered during development on #506.
System Setup
Cloud Type
No response
Steps to Reproduce
...
Expected Behavior
...
Actual Behavior
...
Reproducibility
Always
Relevant Log Output
No response
Anything else?
Related bug on the google issue tracker: 153521693
The text was updated successfully, but these errors were encountered: