[MCOL-4399] Replace the member charsetNumber in all classes to CHARSET_INFO* Created: 2020-11-19  Updated: 2023-07-01

Status: Open
Project: MariaDB ColumnStore
Component/s: ExeMgr, PrimProc
Affects Version/s: N/A
Fix Version/s: 23.10

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


 Description   

Replace all class members charsetNumber to CHARSET_INFO pointer

Many classes store character set and collation information in an integer member "charsetNumber".
Some classes have two members:

  • uint32_t charsetNumber
  • CHARSET_INFO *charset

The former is resolved occasionally from the latter using the get_charset() function.

Let's remove all numberic members charsetNumber. We should always use CHARSET_INFO for the code simplicity.

Conversion from a CHARSET_INFO pointer to a number should only happen in serialization.
Resolving a number to a CHARSET_INFO pointer should only happen in deserialization.



 Comments   
Comment by David Hall (Inactive) [ 2020-11-19 ]

The reason for the separate charsetNumber is because of the distributed nature of our product. We can't stream a pointer, so the number is streamed and the pointer looked up at the receiver – just in time initialization.

Comment by Alexander Barkov [ 2020-11-20 ]

Right, we can't stream a pointer. But we can turn a charset number to pointer as soon as the number gets scanned from a byte stream. There's no a reason to have "charsetNumber" and "charset" members at the same time.

Generated at Thu Feb 08 02:50:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.