summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-01-22 17:14:36 +0100
committerSergei Golubchik <serg@mariadb.org>2017-02-13 18:12:04 +0100
commit29ed440d4457a3cc2ab8c22674eb5dc8f0ac0ce6 (patch)
tree27d782c447324263bec17de8f254a66408a663ca /sql/handler.h
parent4cf4b61b24d4331aa930d0b36c36763b7d9ca0cd (diff)
downloadmariadb-git-29ed440d4457a3cc2ab8c22674eb5dc8f0ac0ce6.tar.gz
MDEV-11836 vcol.vcol_keys_myisam fails in buildbot and outside
move TABLE::key_read into handler. Because in index merge and DS-MRR there can be many handlers per table, and some of them use key read while others don't. "keyread" is really per handler, not per TABLE property.
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/sql/handler.h b/sql/handler.h
index 8b00ec8503b..017d045cdbc 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -2654,6 +2654,7 @@ public:
uint errkey; /* Last dup key */
uint key_used_on_scan;
uint active_index;
+ bool key_read;
/** Length of ref (1-8 or the clustered key length) */
uint ref_length;
@@ -2695,7 +2696,6 @@ private:
public:
void set_time_tracker(Exec_time_tracker *tracker_arg) { tracker=tracker_arg;}
-
Item *pushed_idx_cond;
uint pushed_idx_cond_keyno; /* The index which the above condition is for */
@@ -2751,6 +2751,7 @@ public:
in_range_check_pushed_down(FALSE),
key_used_on_scan(MAX_KEY),
active_index(MAX_KEY),
+ key_read(false),
ref_length(sizeof(my_off_t)),
ft_handler(0), inited(NONE),
pushed_cond(0), next_insert_id(0), insert_id_for_cur_row(0),
@@ -2855,6 +2856,21 @@ public:
int ha_delete_row(const uchar * buf);
void ha_release_auto_increment();
+ int ha_start_keyread()
+ {
+ if (key_read)
+ return 0;
+ key_read= 1;
+ return extra(HA_EXTRA_KEYREAD);
+ }
+ int ha_end_keyread()
+ {
+ if (!key_read)
+ return 0;
+ key_read= 0;
+ return extra(HA_EXTRA_NO_KEYREAD);
+ }
+
int check_collation_compatibility();
int ha_check_for_upgrade(HA_CHECK_OPT *check_opt);
/** to be actually called to get 'check()' functionality*/