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