mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-33942 View cuts off the end of string with the utf8 character set in INSERT function
Item_func_insert::fix_length_and_dec() incorrectly calculated max_length when its collation.collation evaluated to my_charset_bin. Fixing the code to calculate max_length in terms of octets rather than in terms of characters when collation.collation is my_charset_bin.
This commit is contained in:
@@ -2393,6 +2393,16 @@ create view v1 as select left('hello', 4294967295);
|
||||
select * from v1;
|
||||
drop view v1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-33942 View cuts off the end of string with the utf8 character set in INSERT function
|
||||
--echo #
|
||||
|
||||
SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
|
||||
CREATE VIEW v1 AS SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
|
||||
SELECT * FROM v1;
|
||||
DROP VIEW v1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.6 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user