pretyman / spatialite-android

Automatically exported from code.google.com/p/spatialite-android
0 stars 0 forks source link

Database.exec(...) crashes on bad SQL #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. make invalid SQL statement
2. try to execute it in db.exec(invalidSqlStr, new Callback() {...} );
3. wrap it in try{ } catch {Exception e}

What is the expected output? What do you see instead?
exception should be thrown; instead process crashes. Sometimes very silently, 
so I couldn't pinpoint the reason for some time.

What version of the product are you using? On what operating system?
b247b2ca607c Android 2.3.3 device and emulator

Please provide any additional information below.
attached diff adds junit test case to show the issue (I hope I created it 
properly, I've no experience with diff).

Original issue reported on code.google.com by mateuszz...@gmail.com on 18 Mar 2012 at 9:21

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by efroh...@gmail.com on 18 Mar 2012 at 1:37

GoogleCodeExporter commented 9 years ago
It appears that even valid SQL seems to cause a crash.  I tried the following 
string with no luck.

"INSERT INTO test (num, value) VALUES (3,5);"

Original comment by efroh...@gmail.com on 31 Mar 2012 at 7:38

GoogleCodeExporter commented 9 years ago
Issues resolved and changes have been commited.  Tests cases have been updated.

Original comment by efroh...@gmail.com on 1 Apr 2012 at 11:32