Status Update
Comments
da...@google.com <da...@google.com> #2
Branch: androidx-main
commit e81f3bda1116a1734ec397f54dd40f8472203294
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Aug 08 12:22:30 2022
Converting `sqlite` related files in `sqlite` from Java to Kotlin (Part 1/3).
Test: Existing tests
Bug: 240707042
Relnote: Converting `sqlite` related files in `sqlite` from Java to Kotlin.
Change-Id: I7bc3574feaacb12bd4aa1c006579ddc52607a3a5
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/test/java/androidx/room/RoomSQLiteQueryTest.java
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteProgram.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt
M sqlite/sqlite/src/test/java/androidx/sqlite/db/SimpleSQLiteQueryTest.kt
M sqlite/sqlite/api/current.txt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SimpleSQLiteQuery.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteQuery.kt
M room/room-compiler/build.gradle
M room/room-runtime/src/main/java/androidx/room/RoomSQLiteQuery.kt
M sqlite/sqlite-framework/build.gradle
M sqlite/sqlite/api/public_plus_experimental_current.txt
M sqlite/sqlite/build.gradle
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteStatement.kt
M room/room-runtime/api/restricted_current.ignore
M sqlite/sqlite/api/restricted_current.txt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/QueryInterceptorTest.kt
M room/room-runtime/src/main/java/androidx/room/QueryInterceptorDatabase.kt
ib...@gmail.com <ib...@gmail.com> #3
Branch: androidx-main
commit 659c2cdeeb8a045b413da4763d1431497592e5cf
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Aug 08 11:07:43 2022
Renaming `sqlite` related files in `sqlite` from Java to Kotlin (Part 1/3).
Test: Existing tests
Bug: 240707042
Relnote: Converting `sqlite` related files in `sqlite` from Java to Kotlin.
Change-Id: I60b041d58430c70c028b91ef8c86a0d64f89fc3a
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteQuery.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteStatement.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteProgram.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt
M sqlite/sqlite/src/test/java/androidx/sqlite/db/SimpleSQLiteQueryTest.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SimpleSQLiteQuery.kt
da...@google.com <da...@google.com> #4
Branch: androidx-main
commit a55634970cd065189bf9055c9ec5cbbdeeb789fc
Author: elifbilgin <elifbilgin@google.com>
Date: Wed Aug 10 16:44:43 2022
Converting `sqlite-framework` related files in `sqlite-framework` from Java to Kotlin.
Test: Existing tests
Bug: 240707042
Relnote: Converting `sqlite-framework` related files in `sqlite-framework` from Java to Kotlin.
Change-Id: Iaa63a678596118d4d40da7b12a30839166d0bc11
D sqlite/sqlite-framework/src/main/java/androidx/sqlite/util/SneakyThrow.java
M room/room-runtime/src/androidTest/java/androidx/room/AutoClosingRoomOpenHelperTest.kt
M sqlite/sqlite-framework/api/current.txt
M sqlite/sqlite-framework/src/androidTest/java/androidx/sqlite/db/framework/OpenHelperRecoveryTest.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteProgram.kt
M sqlite/sqlite-framework/api/public_plus_experimental_current.txt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/InternalsTest.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/util/ProcessLock.kt
M sqlite/integration-tests/inspection-room-testapp/src/androidTest/java/androidx/sqlite/inspection/RoomInvalidationHookTest.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteStatement.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelperFactory.kt
M sqlite/sqlite-framework/api/restricted_current.txt
ib...@gmail.com <ib...@gmail.com> #5
Branch: androidx-main
commit d6fc345225a1546cdb00a8a2728dfb5adcddb762
Author: elifbilgin <elifbilgin@google.com>
Date: Wed Aug 10 12:55:32 2022
Initial code check-in for renaming `sqlite-framework` related files in `sqlite` from *.java to *.kt.
Test: N/A
Bug: 240707042
Relnote: Initial code check-in for renaming `sqlite-framework` related files in `sqlite` from *.java to *.kt.
Change-Id: I2ecd06a8122751ae46765a8a354a6c1e191e2149
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/util/ProcessLock.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteProgram.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteStatement.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelperFactory.kt
da...@google.com <da...@google.com> #6
Branch: androidx-main
commit 5e2fab48d7c66ec49ae8c1fff52bd0999c94fe05
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Aug 18 10:27:53 2022
Converting `sqlite` related files in `sqlite` from Java to Kotlin (Part 2/3).
Test: Existing tests
Bug: 240707042
Relnote: Converting `sqlite` related files in `sqlite` from Java to Kotlin.
Change-Id: I1d635ae1b6e7ef76de9c626b2088266a6a094a4d
M work/work-runtime/build.gradle
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
M room/room-runtime/src/main/java/androidx/room/AutoClosingRoomOpenHelper.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteQueryBuilder.kt
M work/work-gcm/build.gradle
M sqlite/sqlite/api/current.txt
M work/work-testing/build.gradle
M work/work-runtime/src/androidTest/java/androidx/work/impl/utils/ForceStopRunnableTest.java
M room/room-runtime/src/main/java/androidx/room/SQLiteCopyOpenHelper.kt
M sqlite/sqlite/api/public_plus_experimental_current.txt
M work/work-runtime-ktx/build.gradle
M work/work-inspection/build.gradle
M room/room-runtime/src/main/java/androidx/room/QueryInterceptorOpenHelper.kt
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteOpenHelper.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteOpenHelper.kt
M work/work-multiprocess/build.gradle
M sqlite/sqlite/api/restricted_current.txt
M work/work-benchmark/build.gradle
M work/integration-tests/testapp/build.gradle
ap...@google.com <ap...@google.com> #7
Branch: androidx-main
commit 751e9ba511b3263cab58bd877afe2dd7dc77b891
Author: elifbilgin <elifbilgin@google.com>
Date: Wed Aug 17 16:31:25 2022
Renaming `sqlite` related files in `sqlite` from Java to Kotlin (Part 2/3).
Test: Existing tests
Bug: 240707042
Relnote: Renaming `sqlite` related files in `sqlite` from Java to Kotlin.
Change-Id: I0c0558046191bd05621ae39988b4b7cd5b9459c5
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteQueryBuilder.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteOpenHelper.kt
da...@google.com <da...@google.com>
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit 684e629ec17072ea31aae485492b4fd2b10043f6
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Aug 30 18:47:45 2022
Converting SupportSQLiteDatabase from *.java to *.kt.
Test: N/A
Bug: 240707042
Relnote: Converting SupportSQLiteDatabase from *.java to *.kt.
Change-Id: I251619c5d7a0869b89fe23217abd768c295f5e1f
M room/room-runtime/src/androidTest/java/androidx/room/AutoClosingRoomOpenHelperFactoryTest.kt
M sqlite/sqlite-ktx/build.gradle
M sqlite/sqlite-framework/src/main/java/androidx/sqlite/db/framework/FrameworkSQLiteDatabase.kt
M sqlite/sqlite-ktx/src/main/java/androidx/sqlite/db/SupportSQLiteDatabaseExt.kt
A sqlite/sqlite/api/current.ignore
A sqlite/sqlite/api/restricted_current.ignore
M room/room-runtime/src/main/java/androidx/room/AutoClosingRoomOpenHelper.kt
M sqlite/integration-tests/inspection-sqldelight-testapp/build.gradle
M sqlite/sqlite-inspection/build.gradle
M sqlite/sqlite/api/current.txt
M sqlite/integration-tests/inspection-room-testapp/build.gradle
M room/room-ktx/src/test/java/androidx/room/MigrationTest.kt
M room/room-runtime/src/test/java/androidx/room/InvalidationTrackerTest.kt
M sqlite/sqlite-framework/build.gradle
M sqlite/sqlite/api/public_plus_experimental_current.txt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt
M work/work-runtime/src/main/java/androidx/work/impl/WorkDatabaseMigrations.kt
M sqlite/sqlite/build.gradle
M sqlite/sqlite/api/restricted_current.txt
M room/room-runtime/src/main/java/androidx/room/QueryInterceptorDatabase.kt
pr...@google.com <pr...@google.com> #9
Branch: androidx-main
commit 89bfc918a0bfe3237470262b75fd4a71c4048a1e
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Aug 30 18:07:34 2022
Initial code check-in for renaming SupportSQLiteDatabase from *.java to *.kt.
Test: N/A
Bug: 240707042
Relnote: Initial code check-in for renaming SupportSQLiteDatabase from *.java to *.kt.
Change-Id: I5627dba94bad99b1110778cd3e770c1f2a996294
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteDatabase.kt
ib...@gmail.com <ib...@gmail.com> #10
This bug was linked in a change in the following release(s):
androidx.room:room-ktx:2.5.0-beta01
androidx.room:room-runtime:2.5.0-beta01
androidx.sqlite:sqlite:2.3.0-beta01
androidx.sqlite:sqlite-framework:2.3.0-beta01
androidx.sqlite:sqlite-ktx:2.3.0-beta01
androidx.work:work-gcm:2.8.0-beta01
androidx.work:work-multiprocess:2.8.0-beta01
androidx.work:work-runtime:2.8.0-beta01
androidx.work:work-runtime-ktx:2.8.0-beta01
androidx.work:work-testing:2.8.0-beta01
da...@google.com <da...@google.com> #11
The flags are working as expected, but looks like the issue is in our JNI implementation, specifically we use sqlite3_errcode
to get the 'last result code' and that is dangerous since it is a connection level API and if the connection is being used concurrently the 'last result code' of a statement might be from a different statement being executed, in other words we need to localize the 'last result code' per statement. I'll work on a fix. Again, I appreciate the feedback and you trying out the driver.
ap...@google.com <ap...@google.com> #12
Project: platform/frameworks/support
Branch: androidx-main
Author: Daniel Santiago Rivera <
Link:
Use sqlite3_stmt_busy to check if there are rows in a statement.
Expand for full commit details
Use sqlite3_stmt_busy to check if there are rows in a statement.
Instead of using 'sqlite3_errcode(db) == SQLITE_ROW' to check if a statement is in a row and ready to read columns, use sqlite3_stmt_busy as that API is local to the statement and avoids the risk of sqlite3_errcode that works on a database connection returning a result code that is irrelevant to the statement when the connection is being used concurrently.
Bug: 340949940
Test: BaseBundledConformanceTest.openWithFullMutexFlag
Change-Id: If02039b90c6415a7532ae94f1c99e1182b546db8
Files:
- M
sqlite/integration-tests/driver-conformance-test/src/commonTest/kotlin/androidx/sqlite/driver/test/BaseBundledConformanceTest.kt
- M
sqlite/sqlite-bundled/src/jvmAndroidMain/jni/sqlite_bindings.cpp
- M
sqlite/sqlite-framework/src/nativeMain/kotlin/androidx/sqlite/driver/NativeSQLiteStatement.kt
Hash: 5885a89d74a47b73d2e05abefc979279b85c14fe
Date: Wed Sep 25 12:13:07 2024
da...@google.com <da...@google.com>
na...@google.com <na...@google.com> #13
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.sqlite:sqlite-bundled-iossimulatorarm64:2.5.0-alpha10
androidx.sqlite:sqlite-bundled-iosx64:2.5.0-alpha10
androidx.sqlite:sqlite-bundled-jvm:2.5.0-alpha10
androidx.sqlite:sqlite-bundled-linuxarm64:2.5.0-alpha10
androidx.sqlite:sqlite-bundled-linuxx64:2.5.0-alpha10
androidx.sqlite:sqlite-bundled-macosarm64:2.5.0-alpha10
androidx.sqlite:sqlite-bundled-macosx64:2.5.0-alpha10
androidx.sqlite:sqlite-framework:2.5.0-alpha10
androidx.sqlite:sqlite-framework-android:2.5.0-alpha10
androidx.sqlite:sqlite-framework-iosarm64:2.5.0-alpha10
androidx.sqlite:sqlite-framework-iossimulatorarm64:2.5.0-alpha10
androidx.sqlite:sqlite-framework-iosx64:2.5.0-alpha10
androidx.sqlite:sqlite-framework-linuxarm64:2.5.0-alpha10
androidx.sqlite:sqlite-framework-linuxx64:2.5.0-alpha10
androidx.sqlite:sqlite-framework-macosarm64:2.5.0-alpha10
androidx.sqlite:sqlite-framework-macosx64:2.5.0-alpha10
Description
Version used: 2.5.0-alpha02
Devices/Android versions reproduced on: Pixel 6
I tried to migrate from
2024-05-16 11:41:26.367 30919-30967 libc org.btcmap.debug A Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8000004300003b in tid 30967 (DefaultDispatch), pid 30919 (rg.btcmap.debug)
2024-05-16 11:41:26.662 31039-31039 DEBUG pid-31039 A Cmdline: org.btcmap.debug
2024-05-16 11:41:26.662 31039-31039 DEBUG pid-31039 A pid: 30919, tid: 30967, name: DefaultDispatch >>> org.btcmap.debug <<<
2024-05-16 11:41:26.662 31039-31039 DEBUG pid-31039 A #00 pc 00000000000cb30c /data/app/~~98VGkyL4jH13WZ5B1K-MmQ==/org.btcmap.debug-MmWOzd6cam3KXcL8NYi-uA==/base.apk!libsqliteJni.so (offset 0x930000)
The app itself is open source and it doesn't need any extra setup, you can easily reproduce it by launching it in the emulator or on a real device. Usually it crashes before moving the map, but it will crash for sure if you start moving the map, since it triggers a few queries.
It's possible that I messed up a few queries during that transition, but I don't think it should cause crashes, and it can surely be more specific on where it's failing and why