From: Andrea Zagli Date: Sat, 1 Oct 2011 11:37:19 +0000 (+0200) Subject: Bugfix for INSERT INTO from SELECT. X-Git-Tag: 0.5.0~1 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=b3df89a7b2fef54713b794b77d0fc3ce64d2132e;p=zakaudit%2Flibzakaudit Bugfix for INSERT INTO from SELECT. It seems that libgda can't parse values. --- diff --git a/src/audit.c b/src/audit.c index e485e3b..4aafe0c 100644 --- a/src/audit.c +++ b/src/audit.c @@ -1049,7 +1049,16 @@ zak_audit_action_from_gdastatement (ZakAudit *zak_audit, /* TODO reduntant */ fields = sql->fields_list; - values = ((GSList *)sql->values_list)->data; + + if (sql->values_list == NULL) + { + /* may be it is an INSERT with SELECT */ + values = NULL; + } + else + { + values = ((GSList *)sql->values_list)->data; + } while (fields != NULL && values != NULL) {