diff options
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r-- | sql/ha_partition.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 09f7deb805b..400ca6129d6 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3793,6 +3793,8 @@ int ha_partition::external_lock(THD *thd, int lock_type) (void) (*file)->ha_external_lock(thd, lock_type); } while (*(++file)); } + if (lock_type == F_WRLCK && m_part_info->part_expr) + m_part_info->part_expr->walk(&Item::register_field_in_read_map, 1, 0); DBUG_RETURN(0); err_handler: @@ -3927,6 +3929,8 @@ int ha_partition::start_stmt(THD *thd, thr_lock_type lock_type) /* Add partition to be called in reset(). */ bitmap_set_bit(&m_partitions_to_reset, i); } + if (lock_type == F_WRLCK && m_part_info->part_expr) + m_part_info->part_expr->walk(&Item::register_field_in_read_map, 1, 0); DBUG_RETURN(error); } @@ -8459,17 +8463,6 @@ uint ha_partition::min_record_length(uint options) const return max; } -/* - Register that we want to read partition columns. This is needed to ensure - that virtual columns are properly updated before we access them. -*/ - -void ha_partition::register_columns_for_write() -{ - if (m_part_info->part_expr) - m_part_info->part_expr->walk(&Item::register_field_in_read_map, 1, 0); -} - /**************************************************************************** MODULE compare records ****************************************************************************/ |