diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-09-15 20:59:04 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-09-15 20:59:04 +0400 |
commit | 65d26d1f31070b5b9c05eba4eb8f4432e56055e0 (patch) | |
tree | 6edf7fb465892e4a64cbfcde3ac071bf094582a1 /sql/item_timefunc.cc | |
parent | fa2701c6f7b028782cf231565f578b2fc0f10d51 (diff) | |
download | mariadb-git-65d26d1f31070b5b9c05eba4eb8f4432e56055e0.tar.gz |
MDEV-10191 non convertible chars convert() resulted in Null instead "?" on Windows
The problem was introduced by the patch for MDEV-7661,
which (in addition to the fix itself) included an attempt to make
CONVERT/CAST work in the same way with fields
(i.e. return NULL in strict mode if a non-convertable character found).
It appeared to be a bad idea and some users were affected by this
behavior change. Changing CONVERT/CAST not depend on sql_mode
(restoring pre-10.1.4 behavior).
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index fa74a1903da..d8a37b37315 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2396,7 +2396,7 @@ String *Item_char_typecast::copy(String *str, CHARSET_INFO *strcs) if (copier.copy_with_warn(cast_cs, &tmp_value, strcs, str->ptr(), str->length(), cast_length)) { - null_value= 1; // In strict mode: malformed data or could not convert + null_value= 1; // EOM return 0; } check_truncation_with_warn(str, copier.source_end_pos() - str->ptr()); |