diff options
author | Luis Soares <luis.soares@sun.com> | 2009-01-23 13:22:05 +0100 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2009-01-23 13:22:05 +0100 |
commit | df8543868db346fcddad5dad356fb70bdaa679d7 (patch) | |
tree | 62fe82ffb4b2f249d2e0c6686acb8c060ed5f0bd /sql/sql_partition.cc | |
parent | bb42e1ab05f9ebe166524d7d8a25c55a69e65dfa (diff) | |
parent | aec81abb3b127e9a6c68bfe9562fd3d7cd385e0b (diff) | |
download | mariadb-git-df8543868db346fcddad5dad356fb70bdaa679d7.tar.gz |
merge: 5.1 -> 5.1-rpl
conflicts:
Text conflict in client/mysqltest.cc
Text conflict in mysql-test/include/wait_until_connected_again.inc
Text conflict in mysql-test/lib/mtr_report.pm
Text conflict in mysql-test/mysql-test-run.pl
Text conflict in mysql-test/r/events_bugs.result
Text conflict in mysql-test/r/log_state.result
Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
Text conflict in mysql-test/r/mysqlcheck.result
Text conflict in mysql-test/r/query_cache.result
Text conflict in mysql-test/r/status.result
Text conflict in mysql-test/suite/binlog/r/binlog_index.result
Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
Text conflict in mysql-test/t/disabled.def
Text conflict in mysql-test/t/events_bugs.test
Text conflict in mysql-test/t/log_state.test
Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
Text conflict in mysql-test/t/mysqlcheck.test
Text conflict in mysql-test/t/query_cache.test
Text conflict in mysql-test/t/rpl_init_slave_func.test
Text conflict in mysql-test/t/status.test
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r-- | sql/sql_partition.cc | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index cddb2808839..ae55c194c3c 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -4233,9 +4233,8 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info, after the change as before. Thus we can reply ok immediately without any changes at all. */ - DBUG_RETURN(fast_end_partition(thd, ULL(0), ULL(0), - table, NULL, - TRUE, NULL, FALSE)); + *fast_alter_partition= TRUE; + DBUG_RETURN(FALSE); } else if (new_part_no > curr_part_no) { @@ -5304,8 +5303,8 @@ static bool write_log_changed_partitions(ALTER_PARTITION_PARAM_TYPE *lpt, DDL_LOG_ENTRY ddl_log_entry; partition_info *part_info= lpt->part_info; DDL_LOG_MEMORY_ENTRY *log_entry; - char tmp_path[FN_LEN]; - char normal_path[FN_LEN]; + char tmp_path[FN_REFLEN]; + char normal_path[FN_REFLEN]; List_iterator<partition_element> part_it(part_info->partitions); uint temp_partitions= part_info->temp_partitions.elements; uint no_elements= part_info->partitions.elements; @@ -5516,7 +5515,7 @@ static bool write_log_drop_shadow_frm(ALTER_PARTITION_PARAM_TYPE *lpt) partition_info *part_info= lpt->part_info; DDL_LOG_MEMORY_ENTRY *log_entry; DDL_LOG_MEMORY_ENTRY *exec_log_entry= NULL; - char shadow_path[FN_LEN]; + char shadow_path[FN_REFLEN]; DBUG_ENTER("write_log_drop_shadow_frm"); build_table_shadow_filename(shadow_path, sizeof(shadow_path), lpt); @@ -5559,8 +5558,8 @@ static bool write_log_rename_frm(ALTER_PARTITION_PARAM_TYPE *lpt) partition_info *part_info= lpt->part_info; DDL_LOG_MEMORY_ENTRY *log_entry; DDL_LOG_MEMORY_ENTRY *exec_log_entry= part_info->exec_log_entry; - char path[FN_LEN]; - char shadow_path[FN_LEN]; + char path[FN_REFLEN]; + char shadow_path[FN_REFLEN]; DDL_LOG_MEMORY_ENTRY *old_first_log_entry= part_info->first_log_entry; DBUG_ENTER("write_log_rename_frm"); @@ -5610,8 +5609,8 @@ static bool write_log_drop_partition(ALTER_PARTITION_PARAM_TYPE *lpt) partition_info *part_info= lpt->part_info; DDL_LOG_MEMORY_ENTRY *log_entry; DDL_LOG_MEMORY_ENTRY *exec_log_entry= part_info->exec_log_entry; - char tmp_path[FN_LEN]; - char path[FN_LEN]; + char tmp_path[FN_REFLEN]; + char path[FN_REFLEN]; uint next_entry= 0; DDL_LOG_MEMORY_ENTRY *old_first_log_entry= part_info->first_log_entry; DBUG_ENTER("write_log_drop_partition"); @@ -5669,8 +5668,8 @@ static bool write_log_add_change_partition(ALTER_PARTITION_PARAM_TYPE *lpt) partition_info *part_info= lpt->part_info; DDL_LOG_MEMORY_ENTRY *log_entry; DDL_LOG_MEMORY_ENTRY *exec_log_entry= NULL; - char tmp_path[FN_LEN]; - char path[FN_LEN]; + char tmp_path[FN_REFLEN]; + char path[FN_REFLEN]; uint next_entry= 0; DBUG_ENTER("write_log_add_change_partition"); @@ -5723,8 +5722,8 @@ static bool write_log_final_change_partition(ALTER_PARTITION_PARAM_TYPE *lpt) partition_info *part_info= lpt->part_info; DDL_LOG_MEMORY_ENTRY *log_entry; DDL_LOG_MEMORY_ENTRY *exec_log_entry= part_info->exec_log_entry; - char path[FN_LEN]; - char shadow_path[FN_LEN]; + char path[FN_REFLEN]; + char shadow_path[FN_REFLEN]; DDL_LOG_MEMORY_ENTRY *old_first_log_entry= part_info->first_log_entry; uint next_entry= 0; DBUG_ENTER("write_log_final_change_partition"); @@ -6679,6 +6678,7 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info, uint32 max_endpoint_val; get_endpoint_func get_endpoint; uint field_len= field->pack_length_in_rec(); + part_iter->ret_null_part= part_iter->ret_null_part_orig= FALSE; if (part_info->part_type == RANGE_PARTITION) { @@ -6699,7 +6699,6 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info, max_endpoint_val= part_info->no_list_values; part_iter->get_next= get_next_partition_id_list; part_iter->part_info= part_info; - part_iter->ret_null_part= part_iter->ret_null_part_orig= FALSE; if (max_endpoint_val == 0) { /* @@ -6761,7 +6760,7 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info, store_key_image_to_rec(field, max_value, field_len); bool include_endp= !test(flags & NEAR_MAX); part_iter->part_nums.end= get_endpoint(part_info, 0, include_endp); - if (part_iter->part_nums.start == part_iter->part_nums.end && + if (part_iter->part_nums.start >= part_iter->part_nums.end && !part_iter->ret_null_part) return 0; /* No partitions */ } @@ -6939,7 +6938,7 @@ int get_part_iter_for_interval_via_walking(partition_info *part_info, uint32 get_next_partition_id_range(PARTITION_ITERATOR* part_iter) { - if (part_iter->part_nums.cur == part_iter->part_nums.end) + if (part_iter->part_nums.cur >= part_iter->part_nums.end) { part_iter->part_nums.cur= part_iter->part_nums.start; return NOT_A_PARTITION_ID; |