summaryrefslogtreecommitdiff
path: root/sql/ha_partition.h
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2018-02-13 18:06:15 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2018-02-13 18:06:15 +0400
commitba125eca551e3f5faee9f6d7ebed290f04cfc8fd (patch)
tree799e3ab293149804a0c6364e2316efb52105db29 /sql/ha_partition.h
parent3c87973235e5f944f9ab82933a8fd00736257261 (diff)
downloadmariadb-git-ba125eca551e3f5faee9f6d7ebed290f04cfc8fd.tar.gz
MDEV-15215 main.partition_explicit_prune fails in bulidbot with assertion failures and server crashes.
ha_partition::get_open_file_sample() implemented to be used when we need a file sample that is surely opened.
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r--sql/ha_partition.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index 9ee767d89d4..1a6bdc35346 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -387,6 +387,9 @@ private:
bool m_key_not_found;
List<String> *m_partitions_to_open;
MY_BITMAP m_opened_partitions;
+ /** This is one of the m_file-s that it guaranteed to be opened. */
+ /** It is set in open_read_partitions() */
+ handler *m_file_sample;
public:
handler **get_child_handlers()
{
@@ -840,8 +843,7 @@ public:
uint part_id);
void set_partitions_to_open(List<String> *partition_names);
int change_partitions_to_open(List<String> *partition_names);
- int open_read_partitions(char *name_buff, size_t name_buff_size,
- handler **sample);
+ int open_read_partitions(char *name_buff, size_t name_buff_size);
virtual int extra(enum ha_extra_function operation);
virtual int extra_opt(enum ha_extra_function operation, ulong cachesize);
virtual int reset(void);
@@ -868,6 +870,7 @@ private:
void late_extra_cache(uint partition_id);
void late_extra_no_cache(uint partition_id);
void prepare_extra_cache(uint cachesize);
+ handler *get_open_file_sample() const { return m_file_sample; }
public:
/*