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 662279 - gda_connection_execute_non_select_command() can return -2 on success
gda_connection_execute_non_select_command() can return -2 on success
Status: RESOLVED FIXED
Product: libgda
Classification: Other
Component: SQLite provider
4.99.x
Other Linux
: Normal normal
: ---
Assigned To: malerba
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-10-20 09:37 UTC by Murray Cumming
Modified: 2011-10-20 16:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gda_connection_execute_non_select_command() (1.12 KB, text/x-csrc)
2011-10-20 09:37 UTC, Murray Cumming
Details

Description Murray Cumming 2011-10-20 09:37:00 UTC
Created attachment 199509 [details]
gda_connection_execute_non_select_command()

This test case shows how, with the sqlite backend, gda_connection_execute_non_select_command() can return -2 on a successful CREATE TABLE query.

That is technically OK because the documentation only says that -1 is an error. However, some people (well, me) might check for < 0 instead of == -1. So maybe the documentation should explicitly mention that other negative results are possible, if this is really intended. However, 0 feels like a better result in this case.
Comment 1 malerba 2011-10-20 16:25:38 UTC
The problem is with the function documentation, I've added a reference to gda_connection_statement_execute_non_select()'s documentation which explains about the -2 value.
See commit http://git.gnome.org/browse/libgda/commit/?id=b08040fd8821c6e46667835f1cc90ec6f60dfded