From 46ea8fa08d764f6a400191fa8e4030bf592ae51b Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 22 Oct 2020 11:03:16 -0400 Subject: [PATCH] TT#98400 increase acc_backup/trash insert buffer size With the increased length of src/dst_leg strings, we must also increase the buffer size for the insert string. Did I mention that we should really move to dynamic strings here... Change-Id: I0e77155d36f434055e36124d37bf699179f887b1 --- medmysql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/medmysql.c b/medmysql.c index 46c0600..3880346 100644 --- a/medmysql.c +++ b/medmysql.c @@ -551,7 +551,7 @@ static void medmysql_buf_escape(MYSQL *m, size_t *buflen, const char *str, char int medmysql_insert_records(med_entry_t *records, uint64_t count, const char *table) { char *sql_buffer = NULL; - size_t sql_buffer_size = (count + 1) * 1024; // some extra space for sql overhead + size_t sql_buffer_size = (count + 1) * (sizeof(med_entry_t) + 64) + 256; size_t buflen = 0; int ret = 0, entries = 0;