diff options
author | Michael Widenius <monty@mariadb.org> | 2019-09-22 04:08:48 +0300 |
---|---|---|
committer | Michael Widenius <monty@mariadb.org> | 2019-09-22 04:08:48 +0300 |
commit | 1bbe8c5e0f6823acd4780d7563e8c02f8b4c5a01 (patch) | |
tree | 640662e33767ac08186f6b1a5cf95c77faf560e7 /sql/field.h | |
parent | ba7725dace48d403187eb2a418a2081703fe5c9d (diff) | |
download | mariadb-git-1bbe8c5e0f6823acd4780d7563e8c02f8b4c5a01.tar.gz |
Proper fix for disabling warnings in read_statistics_for_table().
MDEV-20589: Server still crashes in Field::set_warning_truncated_wrong_value
- Use dbug_tmp_use_all_columns() to mark that all fields can be used
- Remove field->is_stat_field (not needed)
- Remove extra arguments to Field::clone() that should not be there
- Safety fix for Field::set_warning_truncated_wrong_value() to not crash
if table is zero in production builds (We have got crashes several times
here so better to be safe than sorry).
- Threat wrong character string warnings identical to other field
conversion warnings. This removes some warnings we before got from
internal conversion errors. There is no good reason why a user would
get an error in case of 'key_field='wrong-utf8-string' but not for
'field=wrong-utf8-string'. The old code could also easily give
thousands of no-sence warnings for one single statement.
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/field.h b/sql/field.h index c2d1d241e27..053236133d0 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1253,8 +1253,7 @@ public: uchar *new_ptr, uint32 length, uchar *new_null_ptr, uint new_null_bit); Field *clone(MEM_ROOT *mem_root, TABLE *new_table); - Field *clone(MEM_ROOT *mem_root, TABLE *new_table, my_ptrdiff_t diff, - bool stat_flag= FALSE); + Field *clone(MEM_ROOT *mem_root, TABLE *new_table, my_ptrdiff_t diff); Field *clone(MEM_ROOT *mem_root, my_ptrdiff_t diff); inline void move_field(uchar *ptr_arg,uchar *null_ptr_arg,uchar null_bit_arg) { |