[MDEV-31989] Cleanup Lex_ident_fs::check_body() Created: 2023-08-23  Updated: 2023-09-17  Resolved: 2023-08-23

Status: Closed
Project: MariaDB Server
Component/s: Character Sets
Fix Version/s: 11.3.0

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-31531 Remove my_casedn_str() and my_caseup_... In Testing
blocks MDEV-31606 Refactor check_db_name() to get a con... Closed

 Description   

The main goal of this task is to change the data type of the global variable any_db from LEX_CSTRING to Lex_ident_db, to make upcoming changes easier:

-const LEX_CSTRING any_db= {STRING_WITH_LEN("*any*")};
+const Lex_ident_db any_db(STRING_WITH_LEN("*any*"));

But most changes have to be done in Lex_ident_fs::check_body(), hence the task title.

Lex_ident_fs::check_body() depends from system_charset_info, which is initialized after any_db during the server startup.
So we need to change system_charset_info to direct use of my_charset_utf8mb3_general_ci.

Additionally, let's remove the unused code from Lex_ident_fs::check_body().
We always compile in the way that this condition evaluates to true:

#if defined(USE_MB) && defined(USE_MB_IDENT)
...
#else
...
#endif

There is no sence to keep the old MySQL-4.0 code from the "#else" branch.


Generated at Thu Feb 08 10:27:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.