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
-
Activity
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | In Progress [ 3 ] |
Fix Version/s | 1.5.3 [ 22300 ] |
Attachment | CONJ_345.zip [ 42626 ] |
Attachment | CONJ_345.zip [ 42627 ] |
Attachment | CONJ_345.zip [ 42626 ] |
Link |
This issue is caused by |
Component/s | Failover [ 12200 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 77011 ] | MariaDB v4 [ 134902 ] |
Hi,
all seems right. I don't understand how this can occur.
can you send the result of this following queries, to help identify to problem ?
select * from information_schema.collations
where id in ( 45, 46, 224, 225, 226, 227, 228,229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 245, 246, 247)
order by id;
select @@session.collation_connection, @@global.collation_connection,
@@session.collation_database, @@global.collation_database,
@@session.collation_server, @@global.collation_server,
@@session.character_set_client, @@global.character_set_client,
@@session.character_set_connection, @@global.character_set_connection,
@@session.character_set_database, @@global.character_set_database,
@@session.character_set_server, @@global.character_set_server,
@@global.character_set_system;
SELECT default_character_set_name FROM information_schema.SCHEMATA
WHERE schema_name = "<The default schema used>";
because, it's seems, server is configured as binary, not utf8mb4, but driver normally change binary to utf8 in this case...but this doesn't correspond to your error.