diff options
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc index 63d39c77d95..b72b0357c23 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -11101,6 +11101,14 @@ Field::set_warning(Sql_condition::enum_warning_level level, uint code, will have table == NULL. */ THD *thd= get_thd(); + + /* + In INPLACE ALTER, server can't know which row has generated + the warning, so the value of current row is supplied by the engine. + */ + if (current_row) + thd->get_stmt_da()->reset_current_row_for_warning(current_row); + if (thd->count_cuted_fields > CHECK_FIELD_EXPRESSION) { thd->cuted_fields+= cut_increment; |