Details
Description
The following script produces a wrong output - a non-ASCII SEPARATOR in GROUP_CONCAT gets replaced to the question mark.
SET NAMES utf8, @@collation_connection=latin1_swedish_ci; |
CREATE OR REPLACE TABLE t1 (c VARCHAR(10)) CHARACTER SET latin1; |
INSERT INTO t1 VALUES ('a'),('A'); |
CREATE OR REPLACE VIEW v1 AS |
SELECT LEFT(GROUP_CONCAT(c SEPARATOR 'ß'), 20) AS example FROM t1 GROUP BY c; |
SELECT * FROM v1; |
+---------+
|
| example |
|
+---------+
|
| a?A |
|
+---------+
|
The output looks wrong. The expected result is 'aßA'.
SHOW CREATE VIEW output is also wrong.
SHOW CREATE VIEW v1; |
+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
| View | Create View | character_set_client | collation_connection |
|
+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
| v1 | CREATE ALGORITHM=UNDEFINED DEFINER=`bar`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(group_concat(`t1`.`c` separator '?'),20) AS `example` from `t1` group by `t1`.`c` | utf8mb3 | latin1_swedish_ci |
|
+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
Attachments
Issue Links
- blocks
-
MDEV-33696 main.dyncol and ctype_unicode_casefold_bmp.inc in --view
- Closed