MDEV-25420 JSON_TABLE: ASAN heap-buffer-overflow in Protocol::net_store_data or consequent failures.

error in the patch fixed.
This commit is contained in:
Alexey Botchkov 2021-04-16 15:12:46 +04:00
parent 91cd3c8f5b
commit 0984b8ed08

View File

@ -18293,10 +18293,10 @@ Create_tmp_table::Create_tmp_table(ORDER *group, bool distinct,
static void add_null_bits_for_field(const Field *f, uint *null_counter)
{
if (!f->flags & NOT_NULL_FLAG)
if (!(f->flags & NOT_NULL_FLAG))
(*null_counter)++;
if (f->type() != MYSQL_TYPE_BIT)
if (f->type() == MYSQL_TYPE_BIT)
(*null_counter)+= f->field_length & 7;
}