[MDEV-27743] Remove Lex::charset Created: 2022-02-04  Updated: 2023-03-10  Resolved: 2022-03-23

Status: Closed
Project: MariaDB Server
Component/s: Character Sets, Parser
Fix Version/s: 10.9.0

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

Issue Links:
Blocks
blocks MDEV-27009 Add UCA-14.0.0 collations Closed
Problem/Incident
causes MDEV-30681 SIGFPE / UBSAN runtime error: divisio... Closed
causes MDEV-30805 SIGSEGV in my_convert and UBSAN: memb... Closed
Relates
relates to MDEV-27690 Crash on `CHARACTER SET csname COLLAT... Closed
relates to MDEV-27782 Wrong columns when using table level ... Closed
relates to MDEV-27853 Wrong data type on column `COLLATE DE... Closed
relates to MDEV-28067 Multiple conflicting column COLLATE c... Closed
relates to MDEV-28118 Wrong collation of `CAST(.. AS CHAR C... Closed
relates to MDEV-28119 Wrong column collation on MODIFY + CO... Closed
relates to MDEV-28117 Multiple conflicting table COLLATE cl... Closed

 Description   

We want to pass more structures through the Bison stack instead of using Lex members.

In particular, we want to get rid of Lex->charset.

Reasons:

  • The current implementation is hard to follow and change. It has caused a few bugs already. Passing data through the bison stack is much easier to follow!
  • We'll have contextually typed collations soon:

    -- Use the xxx_uca1400_as_ci collation of the column implicit character set:
    CREATE TABLE t1 (a CHAR(10) COLLATE uca1400_as_ci);
    

    The above will resolve to:

  • COLLATE utf8mb4_uca1400_as_ci (in case if the column character set is later resolved to utf8mb4)
  • COLLATE utf16_uca1400_as_ci (in case if the column character set is later resolved to utf16
  • and so on

So the code logic must be simlified before this change.

This change will also fix a few problems:



 Comments   
Comment by Alexander Barkov [ 2022-03-21 ]

serg, please check the patch with review suggestions addressed:

https://github.com/MariaDB/server/tree/bb-10.9-bar-MDEV-27743

Thanks.

Generated at Thu Feb 08 09:55:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.