mariadb/client
Alexander Barkov 75f25e4ca7 MDEV-30164 System variable for default collations
This patch adds a way to override default collations
(or "character set collations") for desired character sets.

The SQL standard says:
> Each collation known in an SQL-environment is applicable to one
> or more character sets, and for each character set, one or more
> collations are applicable to it, one of which is associated with
> it as its character set collation.

In MariaDB, character set collations has been hard-coded so far,
e.g. utf8mb4_general_ci has been a hard-coded character set collation
for utf8mb4.

This patch allows to override (globally per server, or per session)
character set collations, so for example, uca1400_ai_ci can be set as a
character set collation for Unicode character sets
(instead of compiled xxx_general_ci).

The array of overridden character set collations is stored in a new
(session and global) system variable @@character_set_collations and
can be set as a comma separated list of charset=collation pairs, e.g.:

SET @@character_set_collations='utf8mb3=uca1400_ai_ci,utf8mb4=uca1400_ai_ci';

The variable is empty by default, which mean use the hard-coded
character set collations (e.g. utf8mb4_general_ci for utf8mb4).

The variable can also be set globally by passing to the server startup command
line, and/or in my.cnf.
2023-07-17 14:56:17 +04:00
..
async_example.c
client_metadata.h
client_priv.h
CMakeLists.txt
completion_hash.cc
completion_hash.h
echo.c
mariadb-conv.cc
my_readline.h
mysql.cc Merge 10.11 into 11.0 2023-07-04 08:20:20 +03:00
mysql_plugin.c
mysql_upgrade.c
mysqladmin.cc MDEV-15736 Remove mariadb-admin --vertical 2023-07-12 10:58:43 +10:00
mysqlbinlog.cc MDEV-30164 System variable for default collations 2023-07-17 14:56:17 +04:00
mysqlcheck.c Merge 10.11 into 11.0 2023-07-04 08:20:20 +03:00
mysqldump.c Merge 10.11 into 11.0 2023-07-04 08:20:20 +03:00
mysqlimport.c Merge 10.11 into 11.0 2023-07-04 08:20:20 +03:00
mysqlshow.c Merge 10.11 into 11.0 2023-07-04 08:20:20 +03:00
mysqlslap.c Merge 10.11 into 11.0 2023-07-04 08:20:20 +03:00
mysqltest.cc
readline.cc