From 1c895bf4480dcecbe0c6bf59a30455e7036281f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Sun, 23 Aug 2015 10:01:31 +0000 Subject: [PATCH] Stop copying queries from server's MySQL_Data_Stream to MySQL_Connection . Only a pointer is passed (issue #343) --- lib/mysql_connection.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/mysql_connection.cpp b/lib/mysql_connection.cpp index 9def84171..2cb6d867f 100644 --- a/lib/mysql_connection.cpp +++ b/lib/mysql_connection.cpp @@ -320,8 +320,9 @@ void MySQL_Connection::set_names_cont(short event) { void MySQL_Connection::set_query(char *stmt, unsigned long length) { query.length=length; - query.ptr=(char *)malloc(length); - memcpy(query.ptr,stmt,length); + query.ptr=stmt; + //query.ptr=(char *)malloc(length); + //memcpy(query.ptr,stmt,length); } void MySQL_Connection::real_query_start() { @@ -807,7 +808,7 @@ void MySQL_Connection::async_free_result() { //assert(ret_mysql); //assert(async_state_machine==ASYNC_QUERY_END); if (query.ptr) { - free(query.ptr); + //free(query.ptr); query.ptr=NULL; query.length=0; }