After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 140113 - sqlite backend splits commands wrong
sqlite backend splits commands wrong
Status: RESOLVED FIXED
Product: libgda
Classification: Other
Component: SQLite provider
1.0.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-db Maintainers
gnome-db Maintainers
: 337334 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-04-15 03:10 UTC by Benjamin Otte (Company)
Modified: 2006-08-02 22:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.95 KB, patch)
2004-04-15 03:11 UTC, Benjamin Otte (Company)
none Details | Review

Description Benjamin Otte (Company) 2004-04-15 03:10:34 UTC
The sqlite backend splits commands by using g_strsplit (sql, ";", 0);
This is wrong because a semicolon might be a valid character inside an sql command.
Examples include escaped strings or create trigger commands.

The attached patch fixes this by using the provided sqlite_complete function.

Included is a one-liner that ensures the return-value is correct in an error case.
Comment 1 Benjamin Otte (Company) 2004-04-15 03:11:22 UTC
Created attachment 26673 [details] [review]
proposed patch
Comment 2 Rodrigo Moya 2004-04-15 10:14:41 UTC
Patch applied to CVS, thanks
Comment 3 Nickolay V. Shmyrev 2006-08-02 22:48:12 UTC
*** Bug 337334 has been marked as a duplicate of this bug. ***
Comment 4 Nickolay V. Shmyrev 2006-08-02 22:50:18 UTC
Bug 131040 is also related