GNOME Bugzilla – Bug 662279
gda_connection_execute_non_select_command() can return -2 on success
Last modified: 2011-10-20 16:25:38 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.
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