[MCOL-5005] Add charset number to system catalog Created: 2022-03-03 Updated: 2023-09-22 Resolved: 2023-08-16 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 23.10.0 |
| Type: | New Feature | Priority: | Major |
| Reporter: | Sergey Zefirov | Assignee: | Gagan Goel (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | rm_infra | ||
| Issue Links: |
|
||||||||||||||||||||
| Sprint: | 2023-8 | ||||||||||||||||||||
| Assigned for Review: | |
||||||||||||||||||||
| Assigned for Testing: | |
||||||||||||||||||||
| Description |
|
When MCOL-4580 was started it is believed that information given by MariaDB's server is sufficient for our purposes. But, it is not. INSERT operations, right now, are given charset numbers but not actual collation. And if collations for database differ, we get wrong ranges in MCOL-4580 (linked) which leads to incorrect SELECT results. The cpimport utility does not have collation information at all and it should receive it from system catalog queries. All-in-all, we need to store in system catalog either pair (charset index, collation index) or just collation index (it appears it is possible to deduce charset index from it) and provide API to fetch these. [Note for the documentation team]: |
| Comments |
| Comment by Gagan Goel (Inactive) [ 2023-07-31 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
For QA: As part of As part of this MCOL, we are adding a new column to calpontsys.syscolumn system catalog table: charsetnum. So, similar to Here are the steps: In an existing installation of ColumnStore (you can use one of the nightly builds of develop branch such as build 8270: https://cspkg.s3.amazonaws.com/index.html?prefix=develop/cron/8270), perform the following operations:
You should notice the last column in calpontsys.syscolumn should be nextvalue. Now, upgrade (remove the existing ColumnStore package and install the new package with the existing data as is) to the version of ColumnStore that contains the charsetnum column in calpontsys.syscolumn. The following PR build 8276 contains this feature: https://cspkg.s3.amazonaws.com/index.html?prefix=develop/pull_request/8276. After the upgrade, make sure the old tables are not impacted:
Create new tables in the upgraded version of ColumnStore:
Now run the following system catalog query:
This system catalog query should now show a new column: charsetnum. The value of this column should be 0 for the old tables (t1, t2, t3). The value of this column for the new tables (t1_2, t2_2, t3_2) should be: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Gagan Goel (Inactive) [ 2023-08-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
dleeyh Please read my last comment for testing instructions. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2023-08-16 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: develop latest Repeated the above tests on the latest build. MTR test case columnstore/basic.mcol-5005 failed because
|