summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2021-05-04 14:49:31 +0300
committerNikita Malyavin <nikitamalyavin@gmail.com>2021-05-04 14:49:31 +0300
commita8a925dd22ae00494cc9ffdc1ff68906106a408c (patch)
treea857c565a22ec7f6f41d3efa72053a726a346af2 /sql/field.h
parent2820f30dde3148df71e1d748ac705d98d60e0787 (diff)
parent72fa9dabadb4b0011f483ccbf1ef59e62d0ef1e0 (diff)
downloadmariadb-git-a8a925dd22ae00494cc9ffdc1ff68906106a408c.tar.gz
Merge branch bb-10.2-release into bb-10.3-release
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/field.h b/sql/field.h
index 1344774c189..a3385736c0a 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -980,8 +980,9 @@ public:
virtual void reset_fields() {}
const uchar *ptr_in_record(const uchar *record) const
{
- my_ptrdiff_t l_offset= (my_ptrdiff_t) (record - table->record[0]);
- return ptr + l_offset;
+ my_ptrdiff_t l_offset= (my_ptrdiff_t) (ptr - table->record[0]);
+ DBUG_ASSERT(l_offset >= 0 && table->s->rec_buff_length - l_offset > 0);
+ return record + l_offset;
}
virtual int set_default();