summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc8
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)