View Issue Details

IDProjectCategoryView StatusLast Update
0001474SymmetricDSBugpublic2014-02-02 20:53
ReporterAl_Assigned Tochenson 
Prioritylow 
Status closedResolutionfixed 
Product Version3.5.10 
Target Version3.5.12Fixed in Version3.5.12 
Summary0001474: sync blocks with java error when a field with affinity 'INTEGER' contains a (empty) string
DescriptionWhen synchronizing (or loading initial data) two sqlite3 databases, the client (that pulls synchronization data from the server) reports an error and does not further load initial data when a field with INTEGER affinity in the server database contains a (empty) string.

The error message is "java.lang.NumberFormatException: Zero length BigInteger".
Steps To ReproducePrepare two sqlite3 databases, client and server, to synchronize table W. My create statement for that table:
"CREATE TABLE W (WNr INTEGER PRIMARY KEY AUTOINCREMENT, Wn TEXT COLLATE NOCASE, Wb TEXT COLLATE NOCASE, FNr INTEGER, SNr INTEGER, R TEXT COLLATE NOCASE, A TEXT, L INTEGER, T INTEGER, metaUUID NONE, metaSource TEXT, metaDate INTEGER);"

Start symmetricDS on server and client, register client node.

The following sql insert statement on the server database leads to the error on the client symmetricDS installation:
"INSERT INTO W (Wn, T) VALUES('testvalue3', '');"
Additional InformationStoring (zero-length or other) strings in an INTEGER-affinity field is acceptable in sqlite3, see https://www.sqlite.org/faq.html#q3

For further details on reproducing this bug see also https://sourceforge.net/p/symmetricds/discussion/739236/thread/651fe476/

The priority of this bug is for me 'low', as I only store empty strings, i.e., I can replace them by NULL. Users that store actual text in such fields are strongly impacted.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: master 7386f42f

2013-11-24 13:26:33

chenson

Details Diff
0001474: sync blocks with java error when a field with affinity 'INTEGER' contains a (empty) string
0001474
mod - symmetric-android/src/main/java/org/jumpmind/symmetric/android/AndroidDatabasePlatform.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDatabasePlatform.java Diff File
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/sqlite/SqliteDatabasePlatform.java Diff File

Issue History

Date Modified Username Field Change
2013-11-24 08:47 Al_ New Issue
2013-11-24 13:26 chenson Assigned To => chenson
2013-11-24 13:26 chenson Status new => assigned
2013-11-24 13:27 chenson Fixed in Version => 3.6.0
2013-11-24 13:27 chenson Target Version => 3.6.0
2013-11-24 13:27 chenson Status assigned => resolved
2013-11-24 13:27 chenson Resolution open => fixed
2013-11-24 18:47 chenson Fixed in Version 3.6.0 => 3.5.12
2013-11-24 18:47 chenson Target Version 3.6.0 => 3.5.12
2013-12-18 10:55 chenson Status resolved => closed
2014-02-02 20:53 Changeset attached => SymmetricDS trunk r7779
2015-07-30 21:49 chenson Changeset attached => SymmetricDS master 7386f42f