summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-04-21 09:01:01 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-04-21 09:01:01 +0300
commit80ed136e6dd4a021b1fc9b7bd7077bf989c3d247 (patch)
treecc24f0e4e9241920329865a1b66c1d086aaeaa9a /sql/field.h
parent675c22c065110be03a5fab82442d2c3dc32aefff (diff)
parenta0588d54a20488b17a178244989e1abc5151a88a (diff)
downloadmariadb-git-80ed136e6dd4a021b1fc9b7bd7077bf989c3d247.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/field.h b/sql/field.h
index 1a1b56b2c02..9fe4db3b521 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -4994,7 +4994,13 @@ public:
void move_field_offset(my_ptrdiff_t ptr_diff) override
{
Field::move_field_offset(ptr_diff);
- bit_ptr= ADD_TO_PTR(bit_ptr, ptr_diff, uchar*);
+
+ /*
+ clang does not like when things are added to a null pointer, even if
+ it is never referenced.
+ */
+ if (bit_ptr)
+ bit_ptr= ADD_TO_PTR(bit_ptr, ptr_diff, uchar*);
}
void hash(ulong *nr, ulong *nr2) override;