diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-06-10 15:38:14 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-06-10 15:38:46 +0530 |
commit | c5489d07655a968bcdfa29f064f2ed13f0abdf62 (patch) | |
tree | 7321270fc229fccc3aa7109f038bf9162fc3957d /sql/sql_table.cc | |
parent | 396864c6b3d2cca9962f7eb58964f50ed6b612dc (diff) | |
download | mariadb-git-bb-10.2-MDEV-25872.tar.gz |
MDEV-25872 InnoDB: Assertion failure in row_merge_read_clustered_index upon ALTER on table with indexed virtual columnsbb-10.2-MDEV-25872
InnoDB fails to check DB_COMPUTE_VALUE_FAILED error in
row_merge_read_clustered_index() and wrongly asserts that
the buffer shouldn't be ran out of memory. Alter table
should give warning when the column value is being
truncated.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 3a3a903bc35..9556cb9f136 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -9680,9 +9680,17 @@ do_continue:; if (use_inplace) { table->s->frm_image= &frm; + enum_check_fields save_count_cuted_fields= thd->count_cuted_fields; + /* + Set the truncated column values of thd as warning for alter table. + */ + thd->count_cuted_fields= CHECK_FIELD_WARN; int res= mysql_inplace_alter_table(thd, table_list, table, altered_table, &ha_alter_info, inplace_supported, &target_mdl_request, &alter_ctx); + + thd->count_cuted_fields= save_count_cuted_fields; + my_free(const_cast<uchar*>(frm.str)); if (res) |