executor,infoschema: Add pad_attribute to collation info | tidb-test=pr/2354
What problem does this PR solve?
Issue Number: close #54250
Problem Summary:
What changed and how does it work?
Check List
Tests
- [x] Unit test
- [x] Integration test
- [x] Manual test (add detailed scripts or steps below)
- [ ] No need to test
- [ ] I checked and no code files have been changed.
Side effects
- [ ] Performance regression: Consumes more CPU
- [ ] Performance regression: Consumes more Memory
- [ ] Breaking backward compatibility
Documentation
- [ ] Affects user behaviors
- [ ] Contains syntax changes
- [ ] Contains variable changes
- [ ] Contains experimental features
- [ ] Changes MySQL compatibility
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
A `pad_attribute` column has been included in the `information_schema.collations` table and in the output of `SHOW COLLATION` to improve MySQL compatibility.
Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all
Hi @dveeden. Thanks for your PR.
PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/ok-to-test
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 57.0857%. Comparing base (
184b010) to head (49e4f77). Report is 115 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #54282 +/- ##
=================================================
- Coverage 74.7619% 57.0857% -17.6762%
=================================================
Files 1523 1672 +149
Lines 361410 628800 +267390
=================================================
+ Hits 270197 358955 +88758
- Misses 71584 246260 +174676
- Partials 19629 23585 +3956
| Flag | Coverage Δ | |
|---|---|---|
| integration | 39.3275% <100.0000%> (?) |
|
| unit | 71.8014% <86.6666%> (-1.8516%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Components | Coverage Δ | |
|---|---|---|
| dumpling | 52.9656% <ø> (-2.2339%) |
:arrow_down: |
| parser | ∅ <ø> (∅) |
|
| br | 52.7049% <ø> (+4.7412%) |
:arrow_up: |
/test mysql-test
@dveeden: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:
/test fast_test_tiprow/test tidb_parser_test
Use /test all to run all jobs.
In response to this:
/test mysql-test
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/retest
Sortlen in MySQL is defined as "related to the amount of memory required to sort strings expressed in the character set", but the meaning of the value is never explained. According to https://dba.stackexchange.com/questions/281360/whats-sortlen-of-mysql-collation
After 20 years of using MySQL, I have found no end-user use for
Sortlen. Ignore it.
If we need to copy the result exactly from MySQL then many of the filled in sortlen are wrongly set to 1 in this PR:
mysql> select any_value(collation_name), sortlen, count(*) from information_schema.collations group by sortlen;
+---------------------------+---------+----------+
| any_value(collation_name) | sortlen | count(*) |
+---------------------------+---------+----------+
| armscii8_general_ci | 1 | 98 |
| cp1250_czech_cs | 2 | 3 |
| gb18030_unicode_520_ci | 8 | 121 |
| latin2_czech_cs | 4 | 2 |
| utf8mb4_0900_ai_ci | 0 | 61 |
| utf8mb4_ja_0900_as_cs_ks | 24 | 1 |
+---------------------------+---------+----------+
6 rows in set (0.02 sec)
OTOH if we accept sortlen is meaningless then keeping them as 1 should be good enough.
I adjusted the sortlen for the collations in the new framework only and kept the rest to 1 as previously reported by show collations.
Don't think it is used anywhere.
@hawkingrei @lcwangchao
[LGTM Timeline notifier]
Timeline:
2024-07-09 16:04:22.240637097 +0000 UTC m=+373559.475871211: :ballot_box_with_check: agreed by tiancaiamao.2024-07-10 07:11:58.047769831 +0000 UTC m=+428015.283003944: :ballot_box_with_check: agreed by hawkingrei.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: hawkingrei, tangenta, tiancaiamao
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [hawkingrei,tangenta,tiancaiamao]
- ~~pkg/infoschema/OWNERS~~ [tangenta]
- ~~pkg/parser/OWNERS~~ [tangenta]
- ~~pkg/planner/OWNERS~~ [hawkingrei]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest
/retest