From d0a1866cf9ac00d938350e7b6ebd05181a9a1261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Thu, 4 Mar 2021 20:33:47 +0000 Subject: [PATCH] Fixed 'process_rows_in_ASYNC_STMT_EXECUTE_STORE_RESULT_CONT' not properly updating 'length' from copied last row after data copy --- lib/mysql_connection.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/mysql_connection.cpp b/lib/mysql_connection.cpp index af6242bc6..89cd98e25 100644 --- a/lib/mysql_connection.cpp +++ b/lib/mysql_connection.cpp @@ -1648,6 +1648,9 @@ void MySQL_Connection::process_rows_in_ASYNC_STMT_EXECUTE_STORE_RESULT_CONT(unsi // update 'stmt->result.data' to the new allocated memory and copy the backed last row query.stmt->result.data = current; memcpy((char *)current->data, (char *)lcopy->data, lcopy->length); + // update the 'current->length' with the length of the copied row + current->length = lcopy->length; + // we free the copy free(lcopy); // change the rows count to 1