diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2020-07-29 01:01:24 +1000 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2020-07-31 17:38:41 +1000 |
commit | fd0abc890f99e2b5ca1b8ae4cb0dc3968eef1208 (patch) | |
tree | e447f8d04288935cbaa44f70ac6fff2c465921db /sql/item_timefunc.cc | |
parent | 91ebf1844f4fbc36edb66023332a045895d07cf5 (diff) | |
download | mariadb-git-fd0abc890f99e2b5ca1b8ae4cb0dc3968eef1208.tar.gz |
MDEV-18042 Server crashes upon adding a non-null date column under NO_ZERO_DATE with ALGORITHM=INPLACE
accept table_name and db_name instead of table_share in make_truncated_value_warning
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index b7455f36d1b..f2f3fdaafe3 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -430,7 +430,7 @@ static bool extract_date_time(DATE_TIME_FORMAT *format, make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, val_begin, length, - cached_timestamp_type, 0, NullS); + cached_timestamp_type, NULL, NULL, NULL); break; } } while (++val != val_end); @@ -1870,13 +1870,13 @@ overflow: { ErrConvInteger err2(sec, unsigned_flag); make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, - &err2, MYSQL_TIMESTAMP_TIME, 0, NullS); + &err2, MYSQL_TIMESTAMP_TIME, NULL, NULL, NULL); } else { ErrConvString err2(err); make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, - &err2, MYSQL_TIMESTAMP_TIME, 0, NullS); + &err2, MYSQL_TIMESTAMP_TIME, NULL, NULL, NULL); } return 0; } @@ -2894,7 +2894,7 @@ bool Item_func_maketime::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) int len = (int)(ptr - buf) + sprintf(ptr, ":%02u:%02u", (uint)minute, (uint)second); make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, buf, len, MYSQL_TIMESTAMP_TIME, - 0, NullS); + NULL, NULL, NULL); } return (null_value= 0); |