diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2021-05-05 23:03:01 +0300 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2021-05-05 23:03:01 +0300 |
commit | 509e4990af4d99e9d3c790eabe1c1705ae910b55 (patch) | |
tree | 02d4ca9409711baef3ec163adc402f2c380df7c8 /sql/field.h | |
parent | 0cc811c633d1fe5290b10fa49fad0a4b889383fa (diff) | |
parent | 4f143a88bcb36e94e9edba8a3c5b4a350dcd9bf9 (diff) | |
download | mariadb-git-509e4990af4d99e9d3c790eabe1c1705ae910b55.tar.gz |
Merge branch bb-10.3-release into bb-10.4-release
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/field.h b/sql/field.h index 421d6bddb2d..477c64727b3 100644 --- a/sql/field.h +++ b/sql/field.h @@ -988,8 +988,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(); |