This patch fixes the computation of the allocation size for the query.
It was not taking into account the length of the name of the procedure.
Signed-off-by: Eric Leblond <eric@inl.fr>
return 0;
}
-#define SQL_INSERTTEMPL "insert into X (Y) values (Z)"
+#define SQL_INSERTTEMPL "SELECT P(Y)"
#define SQL_VALSIZE 100
/* create the static part of our insert statement */
/* we need space for the key and a comma, as well as
* enough space for the values */
size += strlen(upi->input.keys[i].name) + 1 + SQL_VALSIZE;
- }
+ }
+ size += srtlen(procedure);
ulogd_log(ULOGD_DEBUG, "allocating %u bytes for statement\n", size);