diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2019-04-29 20:32:36 +1000 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-04-30 19:48:07 +0200 |
commit | dabef66e66a48f2d5f4ca5fdfd1f9d927e935471 (patch) | |
tree | bf7a285531d7d0b10281d2870a7fb3a8de07a711 /sql/sql_trigger.h | |
parent | 810f014ca7a705381e110cb26649c528bc00f179 (diff) | |
download | mariadb-git-dabef66e66a48f2d5f4ca5fdfd1f9d927e935471.tar.gz |
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
Diffstat (limited to 'sql/sql_trigger.h')
-rw-r--r-- | sql/sql_trigger.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h index 9d1c79cc7cf..6e94f348447 100644 --- a/sql/sql_trigger.h +++ b/sql/sql_trigger.h @@ -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); } |