mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Bug#44352 UPPER/LOWER function doesn't work correctly
on cp932 and sjis environment. Problem: case conversion erroneously changes the second bytes of multi-byte sequences because single-byte functions were called in a mistake. Fix: call multi-byte aware functions instead.
This commit is contained in:
@@ -34,4 +34,10 @@ delimiter ;|
|
||||
--error 1220
|
||||
SHOW BINLOG EVENTS FROM 364;
|
||||
|
||||
--echo Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment.
|
||||
CREATE TABLE t1 (a varchar(16)) character set cp932;
|
||||
INSERT INTO t1 VALUES (0x8372835E),(0x8352835E);
|
||||
SELECT hex(a), hex(lower(a)), hex(upper(a)) FROM t1 ORDER BY binary(a);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
@@ -83,3 +83,13 @@ SET NAMES sjis;
|
||||
SELECT HEX('<27><><EFBFBD><EFBFBD><EFBFBD>@<40>\') FROM DUAL;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
--echo # Start of 5.1 tests
|
||||
|
||||
--echo Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment.
|
||||
CREATE TABLE t1 (a varchar(16)) character set sjis;
|
||||
INSERT INTO t1 VALUES (0x8372835E),(0x8352835E);
|
||||
SELECT hex(a), hex(lower(a)), hex(upper(a)) FROM t1 ORDER BY binary(a);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # End of 5.1 tests
|
||||
|
||||
Reference in New Issue
Block a user