Commit 576c96a9 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-20917: Fix dict_table_t::instant_column()

This is the only 10.4-specific fix. The remaining known issues
will be fixed by merging commit bef843b9
from 10.3.
parent d4e1fa39
......@@ -555,8 +555,9 @@ inline bool dict_table_t::instant_column(const dict_table_t& table,
DBUG_ASSERT(c.is_added());
if (c.def_val.len <= sizeof field_ref_zero
&& !memcmp(c.def_val.data, field_ref_zero,
c.def_val.len)) {
&& (!c.def_val.len
|| !memcmp(c.def_val.data, field_ref_zero,
c.def_val.len))) {
c.def_val.data = field_ref_zero;
} else if (const void*& d = c.def_val.data) {
d = mem_heap_dup(heap, d, c.def_val.len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment