summaryrefslogtreecommitdiff
path: root/sql/ha_partition.h
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2018-06-21 16:46:11 +1000
committerSergei Golubchik <serg@mariadb.org>2018-12-20 08:06:55 +0100
commit6a73569f12fe4883937a669c262716c11d1f9238 (patch)
tree5697b7e4521418a90c2dbb75949df63512682994 /sql/ha_partition.h
parent7b2e2288e9f784ea12f85dc005503511fe99f796 (diff)
downloadmariadb-git-6a73569f12fe4883937a669c262716c11d1f9238.tar.gz
MDEV-16429: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' fails upon attempt to update virtual column on partitioned versioned table
When using buffered sort in `UPDATE`, keyread is used. In this case, `TABLE::update_virtual_field` should be aborted, but it actually isn't, because it is called not with a top-level handler, but with the one that is actually going to access the disk. Here the problemm is issued with partitioning, so the solution is to recursively mark for keyread all the underlying partition handlers. * ha_partition: update keyread state for child partitions Closes #800
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r--sql/ha_partition.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index e348da08443..9a73eeff817 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -649,7 +649,7 @@ public:
void get_dynamic_partition_info(PARTITION_STATS *stat_info,
uint part_id);
virtual int extra(enum ha_extra_function operation);
- virtual int extra_opt(enum ha_extra_function operation, ulong cachesize);
+ virtual int extra_opt(enum ha_extra_function operation, ulong arg);
virtual int reset(void);
virtual uint count_query_cache_dependant_tables(uint8 *tables_type);
virtual my_bool
@@ -659,6 +659,8 @@ public:
uint *n);
private:
+ typedef int handler_callback(handler *, void *);
+
my_bool reg_query_cache_dependant_table(THD *thd,
char *engine_key,
uint engine_key_len,
@@ -669,7 +671,7 @@ private:
**block_table,
handler *file, uint *n);
static const uint NO_CURRENT_PART_ID;
- int loop_extra(enum ha_extra_function operation);
+ int loop_partitions(handler_callback callback, void *param);
int loop_extra_alter(enum ha_extra_function operations);
void late_extra_cache(uint partition_id);
void late_extra_no_cache(uint partition_id);