diff options
author | unknown <holyfoot/hf@hfmain.(none)> | 2007-06-25 14:28:30 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@hfmain.(none)> | 2007-06-25 14:28:30 +0500 |
commit | 7a310d32344d97b265bfffdc89897b6727e45b97 (patch) | |
tree | 92ebe1a8c370f4ac63a8cf0804e3d98447a08cf3 /sql/table.cc | |
parent | 475a08a2f77092781539fc013255f0aab62ca5dd (diff) | |
parent | 50563d39309ba82448a31f6a98e40181422f5147 (diff) | |
download | mariadb-git-7a310d32344d97b265bfffdc89897b6727e45b97.tar.gz |
Merge bk@192.168.21.1:mysql-5.1-opt
into mysql.com:/home/hf/work/27084/my51-27084
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_partition.h:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/partition.result:
merging
mysql-test/t/partition.test:
merging
sql/sql_partition.cc:
SCCS merged
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/table.cc b/sql/table.cc index eab4d175fd8..45ca17afce4 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1589,21 +1589,30 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias, thd->set_n_backup_active_arena(&part_func_arena, &backup_arena); thd->stmt_arena= &part_func_arena; bool tmp; + bool work_part_info_used; tmp= mysql_unpack_partition(thd, share->partition_info, share->partition_info_len, share->part_state, share->part_state_len, outparam, is_create_table, - share->default_part_db_type); + share->default_part_db_type, + &work_part_info_used); outparam->part_info->is_auto_partitioned= share->auto_partitioned; DBUG_PRINT("info", ("autopartitioned: %u", share->auto_partitioned)); - if (!tmp) + /* we should perform the fix_partition_func in either local or + caller's arena depending on work_part_info_used value + */ + if (!tmp && !work_part_info_used) tmp= fix_partition_func(thd, outparam, is_create_table); thd->stmt_arena= backup_stmt_arena_ptr; thd->restore_active_arena(&part_func_arena, &backup_arena); if (!tmp) + { + if (work_part_info_used) + tmp= fix_partition_func(thd, outparam, is_create_table); outparam->part_info->item_free_list= part_func_arena.free_list; + } if (tmp) { if (is_create_table) |