1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-19188 Server Crash When Using a Trigger With A Number of Virtual Columns on INSERT/UPDATE

use s->fields instead of s->stored_fields. extra_null_bitmap is allocated in Table_triggers_list::prepare_record_accessors with respect to virtual fields, so it will not overflow

Closes #1292
This commit is contained in:
Nikita Malyavin
2019-04-29 20:32:36 +10:00
committed by Sergei Golubchik
parent 810f014ca7
commit dabef66e66
3 changed files with 54 additions and 11 deletions

View File

@ -274,7 +274,7 @@ public:
Field **nullable_fields() { return record0_field; }
void reset_extra_null_bitmap()
{
size_t null_bytes= (trigger_table->s->stored_fields -
size_t null_bytes= (trigger_table->s->fields -
trigger_table->s->null_fields + 7)/8;
bzero(extra_null_bitmap, null_bytes);
}