mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-28769 Assertion `(m_ci->state & 32) || m_with_collate' failed in Lex_exact_charset_opt_extended_collate::Lex_exact_charset_opt_extended_collate on SET NAMES
These system variables: @@character_set_client @@character_set_connection @@character_set_database @@character_set_filesystem @@character_set_results @@character_set_server can now be set in numeric format only to IDs of default collations, e.g.: SET @@character_set_xxx=9; -- OK (latin2_general_ci is default) SET @@character_set_xxx=2; -- ERROR (latin2_czech_cs is not default) SET @@character_set_xxx=21; -- ERROR (latin2_hungarian_ci is not default) Before this change the server accepted IDs of non-default collations so all three examples above worked without errors, but this could lead to unexpected behavior in later statements.
This commit is contained in:
@@ -155,30 +155,42 @@ SELECT @@global.character_set_connection;
|
||||
##############################################################
|
||||
SET @@character_set_connection = 1;
|
||||
SELECT @@character_set_connection;
|
||||
|
||||
--echo # latin2_czech_cs is not a default collation
|
||||
--error ER_UNKNOWN_CHARACTER_SET
|
||||
SET @@character_set_connection = 2;
|
||||
SELECT @@character_set_connection;
|
||||
|
||||
SET @@character_set_connection = 3;
|
||||
SELECT @@character_set_connection;
|
||||
SET @@character_set_connection = 36;
|
||||
SELECT @@character_set_connection;
|
||||
SET @@character_set_connection = 99;
|
||||
SELECT @@character_set_connection;
|
||||
|
||||
--echo # cp1250_polish_ci is not a default collation
|
||||
--error ER_UNKNOWN_CHARACTER_SET
|
||||
SET @@character_set_connection = 99;
|
||||
|
||||
--echo # Collation ID 100 does not exist
|
||||
--Error ER_UNKNOWN_CHARACTER_SET
|
||||
SET @@character_set_connection = 100;
|
||||
|
||||
|
||||
SET @@global.character_set_connection = 1;
|
||||
SELECT @@global.character_set_connection;
|
||||
|
||||
--echo # latin2_czech_cs is not a default collation
|
||||
--error ER_UNKNOWN_CHARACTER_SET
|
||||
SET @@global.character_set_connection = 2;
|
||||
SELECT @@global.character_set_connection;
|
||||
|
||||
SET @@global.character_set_connection = 3;
|
||||
SELECT @@global.character_set_connection;
|
||||
SET @@global.character_set_connection = 36;
|
||||
SELECT @@global.character_set_connection;
|
||||
SET @@global.character_set_connection = 99;
|
||||
SELECT @@global.character_set_connection;
|
||||
|
||||
--echo # cp1250_polish_ci is not a default collation
|
||||
--error ER_UNKNOWN_CHARACTER_SET
|
||||
SET @@global.character_set_connection = 99;
|
||||
|
||||
--echo # Collation ID 100 does not exist
|
||||
--Error ER_UNKNOWN_CHARACTER_SET
|
||||
SET @@global.character_set_connection = 100;
|
||||
|
||||
@@ -201,6 +213,10 @@ SET @@character_set_connection = 1.1;
|
||||
SET @@character_set_connection = -1;
|
||||
--Error ER_UNKNOWN_CHARACTER_SET
|
||||
SET @@character_set_connection = 'utf8 ';
|
||||
SET @@character_set_connection=cp1250;
|
||||
--Error ER_UNKNOWN_CHARACTER_SET
|
||||
SET @@character_set_connection = 'l<>tin2';
|
||||
SET @@character_set_connection=cp866;
|
||||
--Error ER_UNKNOWN_CHARACTER_SET
|
||||
SET @@character_set_connection = 'l<>tin2';
|
||||
SET @@character_set_connection = true;
|
||||
|
Reference in New Issue
Block a user