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

cleanup: RAII helper for changing thd->count_cuted_rows

This commit is contained in:
Sergei Golubchik
2020-11-23 19:40:47 +01:00
parent 08b0b70daa
commit 00f54b56b1
12 changed files with 42 additions and 64 deletions

View File

@ -9939,16 +9939,14 @@ 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;
Check_level_instant_set check_level_save(thd, 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)