View Issue Details

IDProjectCategoryView StatusLast Update
0005933SymmetricDSBugpublic2023-07-26 17:53
Reportersymds-tryout Assigned To 
Status acknowledgedResolutionopen 
Product Version3.14.7 
Summary0005933: SqliteDdlReader: Change to pragma table_xinfo not working on Android
DescriptionAs discussed here ( ), the change in commit 729e2e6 in symmetric-db/src/main/java/org/jumpmind/db/platform/sqlite/
from table_info to table_xinfo is not working on Android (at least not in the Android Studio's Simluator).

The code excerpt I'm referring to:

public Table readTable(String catalog, String schema, String tableName) {
        Table table = null;
        List<Column> columns = platform.getSqlTemplate().query("pragma table_xinfo(" + quote(tableName) + ")", COLUMN_MAPPER);

Returned list is empty for table_xinfo, but is filled when using table_info.

This can be seen during debugging as well as in the database inspector where table_info gives results, and table_xinfo does not.

Tested in Android Studio 2022.2.1 Patch 2 , emulated a Pixel 3 XL with Android Pie (9.0).

After changing from table_xinfo to table_info, application works fine again.
I stumbled upon this problem when updating from SymmetricDS-Android-3.12.9 to 3.14.7.
Steps To ReproduceIn Android Studio, try table_info as well as table_xinfo on a table created from SymmetricDS.
Tagsdialect: android, dialect: sqlite



2023-07-23 10:48

reporter   ~0002354

Ticket related to the above mentioned commit:


2023-07-23 12:29

reporter   ~0002355

pragma table_xinfo only supported from Sqlite 3.26.0 ( )

Therefore only supported from Android API Level 30 ( )
which effectively means Android 11 as a minimum requirement ( ).

So using pragma table_xinfo without a version check on Android seems to be a little too optimistic, unless I missed a minimum requirement somewhere.
Personally, I'd prefer to still have Android 9 supported by SymmetricDS.

Issue History

Date Modified Username Field Change
2023-07-23 10:41 symds-tryout New Issue
2023-07-23 10:41 symds-tryout Tag Attached: dialect: android
2023-07-23 10:41 symds-tryout Tag Attached: dialect: sqlite
2023-07-23 10:48 symds-tryout Note Added: 0002354
2023-07-23 12:29 symds-tryout Note Added: 0002355
2023-07-26 17:53 cquamme Status new => acknowledged