summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2022-01-19 18:35:27 +0300
committerSergei Petrunia <psergey@askmonty.org>2022-01-19 18:35:27 +0300
commitda78030ec87e30d2218a0de182ffb87fc541da97 (patch)
tree7f7ce9bb818d56679eaf034b52f05738b8d83da1 /sql/field.h
parente222e44d1bfc995870430bb90d8ac97e91f66cb4 (diff)
parentce4956f3229a8b2c26a4913fdbc190b5c822cb8e (diff)
downloadmariadb-git-preview-10.8-MDEV-26519-json-histograms.tar.gz
Merge MDEV-26519: JSON_HB histograms into 10.8preview-10.8-MDEV-26519-json-histograms
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index 7be16a1457e..078e22c6161 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1514,11 +1514,20 @@ public:
if (null_ptr)
null_ptr=ADD_TO_PTR(null_ptr,ptr_diff,uchar*);
}
+
+ /*
+ Copy the Field's value to buff. The value will be in table->record[]
+ format.
+ */
void get_image(uchar *buff, uint length, CHARSET_INFO *cs) const
{ get_image(buff, length, ptr, cs); }
virtual void get_image(uchar *buff, uint length,
const uchar *ptr_arg, CHARSET_INFO *cs) const
{ memcpy(buff,ptr_arg,length); }
+
+ /*
+ Set Field's value to the value in *buf.
+ */
virtual void set_image(const uchar *buff,uint length, CHARSET_INFO *cs)
{ memcpy(ptr,buff,length); }
@@ -1857,6 +1866,7 @@ public:
{
return (double) 0.5;
}
+ virtual bool pos_through_val_str() { return false;}
/*
Check if comparison between the field and an item unambiguously
@@ -2142,6 +2152,8 @@ public:
{
return pos_in_interval_val_str(min, max, length_size());
}
+ bool pos_through_val_str() override {return true;}
+
bool test_if_equality_guarantees_uniqueness(const Item *const_item) const
override;
SEL_ARG *get_mm_leaf(RANGE_OPT_PARAM *param, KEY_PART *key_part,
@@ -5895,5 +5907,12 @@ ulonglong TABLE::vers_start_id() const
return static_cast<ulonglong>(vers_start_field()->val_int());
}
+double pos_in_interval_for_string(CHARSET_INFO *cset,
+ const uchar *midp_val, uint32 midp_len,
+ const uchar *min_val, uint32 min_len,
+ const uchar *max_val, uint32 max_len);
+
+double pos_in_interval_for_double(double midp_val,
+ double min_val, double max_val);
#endif /* FIELD_INCLUDED */