Bug #86310 multibyte delimiter doesn't work
Submitted: 13 May 2017 11:31 Modified: 13 May 2017 23:45
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.6\5.7\8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: DELIMITER, Unicode, utf8

[13 May 2017 11:31] Daniël van Eeden
Description:
multibyte delimiter doesn't work, but multi character delimiters work

How to repeat:
mysql> delimiter x
mysql> select version()x
+----------------+
| version()      |
+----------------+
| 8.0.1-dmr-labs |
+----------------+
1 row in set (0.00 sec)

mysql> delimiter xx
mysql> select version()xx
+----------------+
| version()      |
+----------------+
| 8.0.1-dmr-labs |
+----------------+
1 row in set (0.00 sec)

mysql> delimiter ł
mysql> select version()ł
    -> \c
mysql> delimiter ;
mysql> delimiter ☺
mysql> select version()☺
    -> \c

Suggested fix:
allow full UTF-8 for delimiters and/or return an error for a unsupported character/string.
[13 May 2017 23:45] MySQL Verification Team
Thank you for the bug report.

miguel@tikal:~/dbs $ ./80c
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.2-dmr Source distribution 2017-may-13

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql 8.0 > delimiter x
mysql 8.0 > select version()x
+-----------+
| version() |
+-----------+
| 8.0.2-dmr |
+-----------+
1 row in set (0,00 sec)

mysql 8.0 > delimiter xx
mysql 8.0 > select version()xx
+-----------+
| version() |
+-----------+
| 8.0.2-dmr |
+-----------+
1 row in set (0,00 sec)

mysql 8.0 > delimiter ł
mysql 8.0 > select version()ł
    -> \c
mysql 8.0 > 

Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.19 Source distribution 2017-apr-19

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql 5.7 > delimiter ł
mysql 5.7 > select version()ł
    -> \c
mysql 5.7 > 

Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.37 Source distribution

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql 5.6 > delimiter ł
mysql 5.6 > select version()ł
    -> \c