diff options
author | mikael/pappa@dator5.(none) <> | 2006-08-31 04:16:22 -0400 |
---|---|---|
committer | mikael/pappa@dator5.(none) <> | 2006-08-31 04:16:22 -0400 |
commit | 295d50b23d6ea7a75932ecaf9646678ab61c3b88 (patch) | |
tree | 1b4c2e8111ecad2e0477f546dd82bc9f31665e88 /sql/sql_partition.cc | |
parent | cb77c9b721468d5f0b5685c09c5549bfea10068b (diff) | |
download | mariadb-git-295d50b23d6ea7a75932ecaf9646678ab61c3b88.tar.gz |
BUG#21658: Crash partition test in prepared statement protocol
Review fixes
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r-- | sql/sql_partition.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index d38ee41e6c3..af69c16c7e5 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -869,12 +869,9 @@ bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table, bool is_sub_part, bool is_field_to_be_setup) { MEM_ROOT new_mem_root; - Query_arena partition_arena(&new_mem_root, Query_arena::INITIALIZED); - Query_arena backup_arena; partition_info *part_info= table->part_info; uint dir_length, home_dir_length; bool result= TRUE; - bool is_prepare; TABLE_LIST tables; TABLE_LIST *save_table_list, *save_first_table, *save_last_table; int error; @@ -1424,7 +1421,6 @@ bool fix_partition_func(THD *thd, TABLE *table, bool result= TRUE; partition_info *part_info= table->part_info; enum_mark_columns save_mark_used_columns= thd->mark_used_columns; - Item *thd_free_list= thd->free_list; DBUG_ENTER("fix_partition_func"); if (part_info->fixed) @@ -3426,8 +3422,7 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf, DBUG_PRINT("info", ("Parse: %s", part_buf)); if (MYSQLparse((void*)thd) || thd->is_fatal_error) { - free_items(thd->free_list); - thd->free_list= NULL; + thd->free_items(); goto end; } /* @@ -3485,9 +3480,8 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf, just to ensure we don't get into strange situations with the item objects. */ - free_items(thd->free_list); + thd->free_items(); part_info= thd->work_part_info; - thd->free_list= NULL; table->s->version= 0UL; } } @@ -3517,8 +3511,7 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf, !((subpart_func_string= thd->alloc(subpart_func_len))))) { mem_alloc_error(part_func_len); - free_items(thd->free_list); - thd->free_list= NULL; + thd->free_items(); goto end; } if (part_func_len) |