Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4(EOL), 10.5, 10.6, 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL)
-
None
Description
10.4.31-dbg>SET @@local.character_set_connection='utf8mb4'; |
Query OK, 0 rows affected (0.000 sec) |
|
10.4.31-dbg>
|
10.4.31-dbg>DELIMITER ||
|
10.4.31-dbg>CREATE FUNCTION f1(str TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin) |
-> RETURNS TEXT CHARACTER SET latin7 COLLATE latin7_bin |
-> BEGIN |
-> SET @param_coll = COLLATION(str); |
-> RETURN str; |
-> END || |
Query OK, 0 rows affected (0.016 sec) |
|
10.4.31-dbg>DELIMITER ;
|
10.4.31-dbg>
|
10.4.31-dbg>SELECT COLLATION(f1('Hello, planet!')); |
+---------------------------------+ |
| COLLATION(f1('Hello, planet!')) | |
+---------------------------------+ |
| latin7_bin |
|
+---------------------------------+ |
1 row in set (0.001 sec) |
|
10.4.31-dbg>SELECT @param_coll; |
+-------------+ |
| @param_coll |
|
+-------------+ |
| NULL | |
+-------------+ |
1 row in set (0.000 sec) |
|
10.4.31-dbg>
|
Expected result
10.4.31-dbg>SELECT @param_coll; |
+--------------------+ |
| @param_coll |
|
+--------------------+ |
| utf8mb4_bin |
|
+--------------------+ |
1 row in set (0.000 sec) |
|
10.4.31-dbg>
|