diff options
author | Alexander Barkov <bar@mariadb.com> | 2020-06-17 11:19:50 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2020-06-17 11:19:50 +0400 |
commit | b46b7144d1999d4950a812486f36f2f0d6ab645d (patch) | |
tree | ba341f76f8dfc1794efed1b155f6ba6ad3558151 /libmysqld/libmysqld.c | |
parent | fb0d18e4128d82ac92c6024cb9d5e4e3c9a6da98 (diff) | |
download | mariadb-git-b46b7144d1999d4950a812486f36f2f0d6ab645d.tar.gz |
MDEV-21695 Server crashes in TABLE::evaluate_update_default_function upon UPDATE on temporary table
copy_data_between_tables() sets to->s->default_fields to 0, as a part
of the code disabling ON UPDATE actions for all old fields
(so ON UPDATE is enable only for new fields during copying).
After the actual copying, copy_data_between_tables() did not restore
to->s->default_fields to the original value. As a result, the
TABLE_SHARE to->s was left in a wrong state after copy_data_between_tables()
and further open_table_from_share() using this TABLE_SHARE did not
populate TABLE::default_field, which further made
TABLE::evaluate_update_default_function() crash on access to NULL
pointer.
Fix:
Changing copy_data_between_tables() to restore to->s->default_fields
to its original value after the copying loop.
Diffstat (limited to 'libmysqld/libmysqld.c')
0 files changed, 0 insertions, 0 deletions