Comments - Change IS_DEFAULT value for INFORMATION_SCHEMA.COLLATIONS
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.
Thanks for your reply but this does not really answer my question.
To be more precise: my question is: How can I influence the behavior of the following command:
When this command is executed the
collation_connectionvariable is reset to
utf8_general_ci, even if the value was different before (e.g.
I would like this to default to
utf8_unicode_ciwithout having to supply the
COLLATEargument to the
SET NAMEScommand. Is this possible? And if not: is this a bug / missing feature?
There is no a way to change the default collation for a character set. Default collations are hard-coded. For example, utf8_general_ci is the hard-coded default collation for the character set utf8.
This is a missing feature.
The SQL standard has "
CREATE CHARACTER SET" statement for this: https://kb.askmonty.org/en/create-character-set-statement/
So one can do:
and then use this:
which effectively sets the connection character set to utf8, and the collation to utf8_unicode_ci.
MariaDB does not support
CREATE CHARACTER SETyet.
The only workaround is to make the application send:
instead of just:
OK, thank you for the great explanation :)