summaryrefslogtreecommitdiff
path: root/sql/sql_time.h
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2020-07-29 01:01:24 +1000
committerNikita Malyavin <nikitamalyavin@gmail.com>2020-07-31 17:38:41 +1000
commitfd0abc890f99e2b5ca1b8ae4cb0dc3968eef1208 (patch)
treee447f8d04288935cbaa44f70ac6fff2c465921db /sql/sql_time.h
parent91ebf1844f4fbc36edb66023332a045895d07cf5 (diff)
downloadmariadb-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/sql_time.h')
-rw-r--r--sql/sql_time.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sql_time.h b/sql/sql_time.h
index 1dafb9b783b..ebfb86cde61 100644
--- a/sql/sql_time.h
+++ b/sql/sql_time.h
@@ -120,15 +120,18 @@ void make_truncated_value_warning(THD *thd,
Sql_condition::enum_warning_level level,
const ErrConv *str_val,
timestamp_type time_type,
- const TABLE_SHARE *s, const char *field_name);
+ const char *db_name, const char *table_name,
+ const char *field_name);
static inline void make_truncated_value_warning(THD *thd,
Sql_condition::enum_warning_level level, const char *str_val,
uint str_length, timestamp_type time_type,
- const TABLE_SHARE *s, const char *field_name)
+ const char *db_name, const char *table_name,
+ const char *field_name)
{
const ErrConvString str(str_val, str_length, &my_charset_bin);
- make_truncated_value_warning(thd, level, &str, time_type, s, field_name);
+ make_truncated_value_warning(thd, level, &str, time_type, db_name, table_name,
+ field_name);
}
extern DATE_TIME_FORMAT *date_time_format_make(timestamp_type format_type,