From 5dfab33c4ec54082daf034da99c4a796410fe4f3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 12 Jan 2017 00:33:21 +0100 Subject: MDEV-11551 Server crashes in Field::is_real_null sometimes table->s->stored_fields is less than table->s->null_fields --- sql/sql_trigger.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 7a61279fc9c..7bfc1e950b5 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -1082,7 +1082,7 @@ bool Table_triggers_list::prepare_record_accessors(TABLE *table) && (table->s->stored_fields != table->s->null_fields)) { - int null_bytes= (table->s->stored_fields - table->s->null_fields + 7)/8; + int null_bytes= (table->s->fields - table->s->null_fields + 7)/8; if (!(extra_null_bitmap= (uchar*)alloc_root(&table->mem_root, null_bytes))) return 1; if (!(record0_field= (Field **)alloc_root(&table->mem_root, -- cgit v1.2.1