Loading libmysqld/lib_sql.cc +8 −14 Original line number Diff line number Diff line Loading @@ -69,10 +69,14 @@ void embedded_get_error(MYSQL *mysql) static void emb_free_rows(THD *thd) { if (!thd->data) return; if (thd->current_stmt) free_root(&thd->data->alloc,MYF(0)); else free_rows(thd->data); thd->data= NULL; } Loading @@ -86,11 +90,8 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, THD *thd=(THD *) mysql->thd; NET *net= &mysql->net; if (thd->data) { emb_free_rows(thd); thd->data= 0; } /* Check that we are calling the client functions in right order */ if (mysql->status != MYSQL_STATUS_READY) { Loading Loading @@ -143,13 +144,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, static void emb_flush_use_result(MYSQL *mysql) { MYSQL_DATA *data= ((THD*)(mysql->thd))->data; if (data) { free_rows(data); ((THD*)(mysql->thd))->data= NULL; } emb_free_rows((THD*) (mysql->thd)); } static MYSQL_DATA * Loading Loading @@ -304,7 +299,6 @@ int emb_unbuffered_fetch(MYSQL *mysql, char **row) static void emb_free_embedded_thd(MYSQL *mysql) { THD *thd= (THD*)mysql->thd; if (thd->data) emb_free_rows(thd); thread_count--; delete thd; Loading Loading
libmysqld/lib_sql.cc +8 −14 Original line number Diff line number Diff line Loading @@ -69,10 +69,14 @@ void embedded_get_error(MYSQL *mysql) static void emb_free_rows(THD *thd) { if (!thd->data) return; if (thd->current_stmt) free_root(&thd->data->alloc,MYF(0)); else free_rows(thd->data); thd->data= NULL; } Loading @@ -86,11 +90,8 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, THD *thd=(THD *) mysql->thd; NET *net= &mysql->net; if (thd->data) { emb_free_rows(thd); thd->data= 0; } /* Check that we are calling the client functions in right order */ if (mysql->status != MYSQL_STATUS_READY) { Loading Loading @@ -143,13 +144,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, static void emb_flush_use_result(MYSQL *mysql) { MYSQL_DATA *data= ((THD*)(mysql->thd))->data; if (data) { free_rows(data); ((THD*)(mysql->thd))->data= NULL; } emb_free_rows((THD*) (mysql->thd)); } static MYSQL_DATA * Loading Loading @@ -304,7 +299,6 @@ int emb_unbuffered_fetch(MYSQL *mysql, char **row) static void emb_free_embedded_thd(MYSQL *mysql) { THD *thd= (THD*)mysql->thd; if (thd->data) emb_free_rows(thd); thread_count--; delete thd; Loading