[libgda/LIBGDA_5.2] SQLite: handle WITHOUT ROWID without any error
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_5.2] SQLite: handle WITHOUT ROWID without any error
- Date: Thu, 3 Sep 2015 18:33:23 +0000 (UTC)
commit 8d9e57f65f3ad023ca19bb7e3714e151ad3fbe91
Author: Vivien Malerba <malerba gnome-db org>
Date: Tue Jul 7 17:17:53 2015 +0200
SQLite: handle WITHOUT ROWID without any error
libgda/sqlite/gda-sqlite-provider.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/libgda/sqlite/gda-sqlite-provider.c b/libgda/sqlite/gda-sqlite-provider.c
index da031af..c1e7e49 100644
--- a/libgda/sqlite/gda-sqlite-provider.c
+++ b/libgda/sqlite/gda-sqlite-provider.c
@@ -2731,12 +2731,11 @@ make_last_inserted_set (GdaConnection *cnc, GdaStatement *stmt, sqlite3_int64 la
params = g_object_get_data ((GObject*) stmt, MAKE_LAST_INSERTED_SET_ID "P");
g_assert (params);
g_assert (gda_set_set_holder_value (params, NULL, "lid", last_id));
- model = gda_connection_statement_execute_select (cnc, statement, params, &lerror);
+ model = gda_connection_statement_execute_select (cnc, statement, params, NULL);
if (!model) {
- g_warning (_("Can't execute SELECT statement to get last inserted row: %s"),
- lerror && lerror->message ? lerror->message : _("No detail"));
- if (lerror)
- g_error_free (lerror);
+ /* may have failed if the table has the WITHOUT ROWID optimization
+ * see: https://www.sqlite.org/withoutrowid.html
+ */
return NULL;
}
else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]