mirror of
https://github.com/MariaDB/server.git
synced 2025-11-15 09:02:33 +03:00
Bug#14146 CHAR(...USING ...) and CONVERT(CHAR(...) USING...) produce different results
ctype_utf8.result, ctype_utf8.test: Adding test case. item_strfunc.cc: item_strfunc.h: Moving the well formed checking code into a method, to reuse in several Item_func_xxx. Reusing the new method in Item_func_char and Item_func_charset_conv. sql/item_strfunc.h: Bug#14146 CHAR(...USING ...) and CONVERT(CHAR(...) USING...) produce different results Moving the well formed checking code into a method, to reuse in several Item_func_xxx. sql/item_strfunc.cc: Moving the well formed checking code into a method, to reuse in several Item_func_xxx. mysql-test/t/ctype_utf8.test: Adding test case. mysql-test/r/ctype_utf8.result: Adding test case.
This commit is contained in:
@@ -1095,6 +1095,11 @@ char(0xff,0x8f using utf8)
|
||||
<EFBFBD><EFBFBD>
|
||||
Warnings:
|
||||
Warning 1300 Invalid utf8 character string: 'FF8F'
|
||||
select convert(char(0xff,0x8f) using utf8);
|
||||
convert(char(0xff,0x8f) using utf8)
|
||||
<EFBFBD><EFBFBD>
|
||||
Warnings:
|
||||
Warning 1300 Invalid utf8 character string: 'FF8F'
|
||||
set sql_mode=traditional;
|
||||
select char(0xff,0x8f using utf8);
|
||||
char(0xff,0x8f using utf8)
|
||||
@@ -1116,6 +1121,11 @@ char(2557 using utf8)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1300 Invalid utf8 character string: 'FD'
|
||||
select convert(char(0xff,0x8f) using utf8);
|
||||
convert(char(0xff,0x8f) using utf8)
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1300 Invalid utf8 character string: 'FF8F'
|
||||
select hex(convert(char(2557 using latin1) using utf8));
|
||||
hex(convert(char(2557 using latin1) using utf8))
|
||||
09C3BD
|
||||
|
||||
Reference in New Issue
Block a user