mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
N'xxx' and _utf8'xxx' are not equivalent
Problem: Unescaping of '\' characters didn't work when processing N'xxx'. Fix: using get_text() instead of get_token() when scanning nationa strings. mysql-test/r/ctype_utf8.result: Adding test case mysql-test/t/ctype_utf8.test: Adding test case sql/sql_lex.cc: Fixing to process national strings using get_tex(), i.e. the same way with usual strings, to make unescaping work.
This commit is contained in:
@ -1066,6 +1066,18 @@ LENGTH(bug)
|
||||
100
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (item varchar(255)) default character set utf8;
|
||||
INSERT INTO t1 VALUES (N'\\');
|
||||
INSERT INTO t1 VALUES (_utf8'\\');
|
||||
INSERT INTO t1 VALUES (N'Cote d\'Ivoire');
|
||||
INSERT INTO t1 VALUES (_utf8'Cote d\'Ivoire');
|
||||
SELECT item FROM t1 ORDER BY item;
|
||||
item
|
||||
Cote d'Ivoire
|
||||
Cote d'Ivoire
|
||||
\
|
||||
\
|
||||
DROP TABLE t1;
|
||||
SET NAMES utf8;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
Warnings:
|
||||
|
@ -878,6 +878,17 @@ SELECT LENGTH(bug) FROM t2;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#17313: N'xxx' and _utf8'xxx' are not equivalent
|
||||
#
|
||||
CREATE TABLE t1 (item varchar(255)) default character set utf8;
|
||||
INSERT INTO t1 VALUES (N'\\');
|
||||
INSERT INTO t1 VALUES (_utf8'\\');
|
||||
INSERT INTO t1 VALUES (N'Cote d\'Ivoire');
|
||||
INSERT INTO t1 VALUES (_utf8'Cote d\'Ivoire');
|
||||
SELECT item FROM t1 ORDER BY item;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#17705: Corruption of compressed index when index length changes between
|
||||
# 254 and 256
|
||||
|
Reference in New Issue
Block a user