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 160846 - consider replacing escape_string with an exposed gda_*_value_to_sql_string
consider replacing escape_string with an exposed gda_*_value_to_sql_string
Status: RESOLVED FIXED
Product: libgda
Classification: Other
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Rodrigo Moya
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-12-09 09:17 UTC by Alan Knowles
Modified: 2005-03-28 10:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alan Knowles 2004-12-09 09:17:44 UTC
looking at the backend code, it would be better to add the escape string code
into the gda_mysql_value_to_sql_string, and add this prototype to the Connection
object.

char * gda_connection_to_sql_string(GdaConnection *connection, GdaValue *value)

hence fixing the escaping of to_sql_string and removing the unnessary
escape_string, in one blow..
Comment 1 Alan Knowles 2005-03-10 16:55:13 UTC
Concept patch here - replaces the escape_string code currently there, and merges
existing to_string code, making queries quote safe.
http://devel.akbkhome.com/svn/index.php/libgda/value_to_sql_string.concept.txt
- (This is not a working patch - memory alloc / freeing and testing need doing,
+ impelementations for other drivers.)

Feedback welcome.