From b3df89a7b2fef54713b794b77d0fc3ce64d2132e Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sat, 1 Oct 2011 13:37:19 +0200 Subject: [PATCH] Bugfix for INSERT INTO from SELECT. It seems that libgda can't parse values. --- src/audit.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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) { -- 2.49.0