Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.5.2
-
None
-
MariaDB 10.1.17 (MacOS X, Ubuntu 16.04), Java 8u102, 64bit
Description
A query that worked fine with mariadb-connector-j 1.4.6 is failing with 1.5.2.
The table structure.
CREATE TABLE `index` (
|
`uid` int(11) NOT NULL DEFAULT '0',
|
`term` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,
|
`prio` int(11) NOT NULL DEFAULT '0',
|
`LENGTH` int(11) DEFAULT NULL,
|
KEY `ix_ig_term_uid_length` (`term`(191),`uid`,`LENGTH`)
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
The query.
SELECT uid,length
|
FROM index USE INDEX(ix_ig_term_uid_length)
|
WHERE term LIKE "a" COLLATE utf8mb4_unicode_ci
|
GROUP BY uid
|
ORDER BY length,prio DESC
|
The error message when 1.5.2 is used.
SQL Error: 1253, SQLState: 42000
|
Error preparing query: COLLATION 'utf8mb4_unicode_ci' is not valid for CHARACTER SET 'binary'
|
The reported server configuration from the obtained connection. This doesn't change between 1.4.6 and 1.5.2.
========== DB character set configuration ===========
|
character_set_client = utf8mb4
|
character_set_connection = utf8mb4
|
character_set_database = utf8mb4
|
character_set_filesystem = binary
|
character_set_results = utf8mb4
|
character_set_server = utf8mb4
|
character_set_system = utf8
|
========== DB collation configuration ===========
|
collation_connection = utf8mb4_general_ci
|
collation_database = utf8mb4_general_ci
|
collation_server = utf8mb4_general_ci
|
Attachments
Issue Links
- is caused by
-
MDEV-10865 COLLATE keyword doesn't work in PREPARE query
- Closed
- relates to
-
CONJ-350 Make server prepare fallback to client prepare if query cannot be prepare
- Closed