[MDEV-31531] Remove my_casedn_str() and my_caseup_str() Created: 2023-06-23  Updated: 2024-01-16

Status: In Testing
Project: MariaDB Server
Component/s: Character Sets
Fix Version/s: 11.5

Type: Task Priority: Critical
Reporter: Alexander Barkov Assignee: Ramesh Sivaraman
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-27490 Allow full utf8mb4 for identifiers Stalled
is blocked by MDEV-31948 Add class DBNameBuffer, split check_d... Closed
is blocked by MDEV-31972 Change parameter of make_sp_name*() f... Closed
is blocked by MDEV-31974 Remove global function normalize_db_n... Closed
is blocked by MDEV-31978 Turn ok_for_lower_case_names() to a m... Closed
is blocked by MDEV-31982 Remove old check_db_name() from prepa... Closed
is blocked by MDEV-31986 Remove old check_db_name() from make_... Closed
is blocked by MDEV-31989 Cleanup Lex_ident_fs::check_body() Closed
is blocked by MDEV-31991 Split class Database_qualified_name Closed
is blocked by MDEV-31992 Automatic conversion from LEX_STRING ... Closed
is blocked by MDEV-32002 Remove my_casedn_str() in append_iden... Closed
is blocked by MDEV-32013 Add Field::val_lex_string_strmake() Closed
is blocked by MDEV-32019 Replace my_casedn_str(local_buffer) t... Closed
is blocked by MDEV-32025 Crashes in MDL_key::mdl_key_init with... Closed
is blocked by MDEV-32026 lowercase_table2.test failures in 11.3 Closed
is blocked by MDEV-32081 Remove my_casedn_str() from get_canon... Closed
Problem/Incident
causes MDEV-33223 Assertion `dst_size > 4' failed in si... Closed
Relates
relates to MDEV-32071 Bad case letter in *.ibd files with -... Open
relates to MDEV-33019 The database part is not case sensiti... Closed
relates to MDEV-33020 The database part is not case sensiti... Open

 Description   

We use my_casedn_str() to convert identifiers to cover case.
This function uses the fact that utf8mb3_bin and utf8mb3_general_ci (used for identifiers internally) cannot increase string length, so it performs conversion in place.

Under terms of MDEV-27490 we'll add support for non-BMP identifiers and upgrade casefolding information to Unicode version 14.0.0.

In Unicode-14.0.0 conversion to lower case can increase binary length, so conversion cannot be done in place.

Let's remove all use of my_casedn_str() and replace them to calls for a similar function CHARSET_INFO::casedn(), which has separate pointers to the source and the destination.

For symmetry, let's also remove my_caseup_str() calls and replace them to calls for CHARSET_INFO::caseup().



 Comments   
Comment by Alexander Barkov [ 2023-11-20 ]

Hello, julien.fritsch. I hope it should not take more than one week.

Comment by Alexander Barkov [ 2023-11-24 ]

Hello serg,

Please review this patch:
https://github.com/MariaDB/server/commit/2821cf816a4e99821bfe58f318d697967e79dc41

Thanks.

Comment by Alexander Barkov [ 2023-12-12 ]

Hello serg,

Please review a new patch version here:

https://github.com/MariaDB/server/commit/ae0320daef76c7c00f1c7dddd2920afed4344a90

I replied review comments by email.

Thanks.

Comment by Alexander Barkov [ 2023-12-14 ]

Hello serg,

Please review a new patch version here:

https://github.com/MariaDB/server/commit/d2de9a89d801cbced9701479e564644340a64fca

See aslo my reply by email

Thanks.

Comment by Sergei Golubchik [ 2023-12-19 ]

d2de9a89d80 is ok to push after taking into account comments from the email review

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