mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-35041 Simple comparison causes "Illegal mix of collations" even with default server settings
The task "MDEV-25829 Change default Unicode collation to uca1400_ai_ci" previously changed collation derivation for string user variables from DERIVATION_EXPLICIT to DERIVATION_COERCIBLE, to resolve illegal collation mix conflicts between table columns and user variables when they have different collations. However, DERIVATION_COERCIBLE was a wrong choice because it caused conflicts between string literals and user variables when they have different collations. Adding a new collation derivation level DERIVATION_USERVAR. This makes the collation of a user variable: - weaker than a table column (like it was intended by MDEV-25829) - but stronger than a literal (like it was in pre-MDEV-25829) Cleanup in sql_type.h: Removing the line "- BINARY(expr)" from the before-DERIVATION_CAST comment, as it was on a wrong place. It's also listed on the correct place before DERIVATION_IMPLICIT.
This commit is contained in:
@ -5152,19 +5152,19 @@ CHARSET(CONCAT(?,_latin1'a'))
|
||||
latin1
|
||||
EXECUTE IMMEDIATE "SELECT COERCIBILITY(?)" USING 5;
|
||||
COERCIBILITY(?)
|
||||
6
|
||||
7
|
||||
EXECUTE IMMEDIATE "SELECT COERCIBILITY(?)" USING 5.5;
|
||||
COERCIBILITY(?)
|
||||
6
|
||||
7
|
||||
EXECUTE IMMEDIATE "SELECT COERCIBILITY(?)" USING 5.5e0;
|
||||
COERCIBILITY(?)
|
||||
6
|
||||
7
|
||||
EXECUTE IMMEDIATE "SELECT COERCIBILITY(?)" USING TIME'10:20:30';
|
||||
COERCIBILITY(?)
|
||||
6
|
||||
7
|
||||
EXECUTE IMMEDIATE "SELECT COERCIBILITY(?)" USING TIMESTAMP'2001-01-01 10:20:30';
|
||||
COERCIBILITY(?)
|
||||
6
|
||||
7
|
||||
#
|
||||
# MDEV-14435 Different UNSIGNED flag of out user variable for YEAR parameter for direct vs prepared CALL
|
||||
#
|
||||
|
Reference in New Issue
Block a user