Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.5, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
Description
COLLATE keyword doesn't work in PREPARE query.
Example :
CREATE TABLE IF NOT EXISTS `tt` ( |
`test` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
 |
SELECT * FROM `tt` WHERE `test` LIKE 'jj' COLLATE utf8mb4_unicode_ci |
Text work well
PREPARE stmt FROM 'SELECT * FROM `tt` WHERE `test` LIKE ? COLLATE utf8mb4_unicode_ci' |
will throw an error
Erreur SQL (1253) : COLLATION 'utf8mb4_unicode_ci' is not valid for CHARACTER SET 'binary'" |
In PREPARE, collate is always considering character set as binary.
Attachments
Issue Links
- causes
-
CONJ-345 Regression with unexpected collation error
-
- Closed
-
- relates to
-
MDEV-16708 Unsupported commands for prepared statements
-
- Closed
-