diff options
author | monty@mysql.com/narttu.mysql.fi <> | 2007-04-16 17:08:29 +0300 |
---|---|---|
committer | monty@mysql.com/narttu.mysql.fi <> | 2007-04-16 17:08:29 +0300 |
commit | 72d135bec59d7556736800bf3f9d268897e2832d (patch) | |
tree | 66913f618e8d3460513451fab5622e144183cd15 /sql-common | |
parent | 455b325b53aa23fa112ad6fe3751d508f017dcb7 (diff) | |
download | mariadb-git-72d135bec59d7556736800bf3f9d268897e2832d.tar.gz |
Clear field_alloc when it's moved to result set (allows us to always call free_root on field_alloc)
Change to use remove_file instead of 'system rm' in a lot of tests. (Should fix some windows test problems)
Removed memory leak in mysql_test if sync_with_master fails.
Do not terminate ndb_cluster_binary_log before the util thread has finnished. This should fix a shutdown bug where a thread is accessing injector_mutex after it's freed.
Patch may fix Bug#27622 "mysqld shutdown, util thread continues, while binlog thread exits"
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index d6fd98a1ed2..2c09498d8f4 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -2604,7 +2604,7 @@ static void mysql_close_free(MYSQL *mysql) */ void mysql_detach_stmt_list(LIST **stmt_list __attribute__((unused)), - const char *func_name) + const char *func_name __attribute__((unused))) { #ifdef MYSQL_CLIENT /* Reset connection handle in all prepared statements. */ @@ -2828,6 +2828,7 @@ MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql) result->field_count= mysql->field_count; /* The rest of result members is bzeroed in malloc */ mysql->fields=0; /* fields is now in result */ + clear_alloc_root(&mysql->field_alloc); /* just in case this was mistakenly called after mysql_stmt_execute() */ mysql->unbuffered_fetch_owner= 0; DBUG_RETURN(result); /* Data fetched */ @@ -2877,6 +2878,7 @@ static MYSQL_RES * cli_use_result(MYSQL *mysql) result->handle= mysql; result->current_row= 0; mysql->fields=0; /* fields is now in result */ + clear_alloc_root(&mysql->field_alloc); mysql->status=MYSQL_STATUS_USE_RESULT; mysql->unbuffered_fetch_owner= &result->unbuffered_fetch_cancelled; DBUG_RETURN(result); /* Data is read to be fetched */ |