From 73d53ea1c76ddf537e378a2d8df9492bef33e457 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 (cherry picked from commit 1b29fd37056f676705d4359352b9b764a6f002d4) (cherry picked from commit 3422246b026dd904527848d3942b56aa4dba55f9) --- medmysql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/medmysql.c b/medmysql.c index 7eb8aaf..41fed81 100644 --- a/medmysql.c +++ b/medmysql.c @@ -416,7 +416,7 @@ void medmysql_cleanup() 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;