1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

fix string literal escaping in views

process multibyte characters correctly, don't escape half of the character
This commit is contained in:
Sergei Golubchik
2023-06-01 22:15:41 +02:00
parent 69684f689c
commit c05ecda61f
7 changed files with 55 additions and 23 deletions

View File

@ -76,6 +76,15 @@ INSERT INTO t1 VALUES (_BINARY'\\''
SELECT a, HEX(a) FROM t1;
DROP TABLE t1;
#
# test how strings are written into view's frm
#
disable_view_protocol;
create view v1 as select hex('<27>\'), hex('<EFBFBD>\t');
select * from v1;
drop view v1;
enable_view_protocol;
# Checking that with character_set_client=binary 0x5C in 0xE05C
# is treated as escape rather than the second byte of a multi-byte character,
# even if character_set_connection is big5/cp932/gbk/sjis.
@ -109,5 +118,5 @@ SELECT HEX(a) FROM t1;
DROP TABLE t1;
--enable_view_protocol
--echo # Start of ctype_E05C.inc
--echo # End of ctype_E05C.inc