Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
None
-
None
Description
Noticed from testing of MDEV-34911 by lstartseva
explain format=json select * from t where c like 'b\\%_c%' |
we get
query 'explain format=json select * from t where c like 'b\\%_c%'' failed: ER_CANT_AGGREGATE_2COLLATIONS (1267): Illegal mix of collations (swe7_swedish_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'like'
|
This is caused by a conversion failure caused by a call to my_wc_mb_8bit with a backslash character, see the MDEV-34911 comment linked above, and comments surrounding that comment.
As observed by psergei:
MariaDB [test]> set names latin1;
|
Query OK, 0 rows affected (0.000 sec)
|
|
MariaDB [test]> select convert('\\' using swe7);
|
+--------------------------+
|
| convert('\\' using swe7) |
|
+--------------------------+
|
| ? |
|
+--------------------------+
|
1 row in set, 1 warning (0.001 sec)
|
|
MariaDB [test]> show warnings;
|
+---------+------+--------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+--------------------------------------------------+
|
| Warning | 1977 | Cannot convert 'latin1' character 0x5C to 'swe7' |
|
+---------+------+--------------------------------------------------+
|
1 row in set (0.000 sec)
|
Attachments
Issue Links
- relates to
-
MDEV-34911 Make SUBSTR(col, 1, n) = const_str sargable
- Stalled