MDEV-36725 Fix innodb_ctype_ldml test in view-protocol mode#4603
MDEV-36725 Fix innodb_ctype_ldml test in view-protocol mode#4603FarihaIS wants to merge 1 commit intoMariaDB:10.6from
Conversation
|
|
gkodinov
left a comment
There was a problem hiding this comment.
this is preliminary review. please wait for the final review.
| SELECT hex(weight_string(_utf8mb4'a' collate utf8mb4_test_400_ci)); | ||
| SELECT hex(weight_string(convert(_utf32 0x10002 using utf8mb4) collate utf8mb4_test_400_ci)); | ||
| SELECT hex(weight_string(_utf8mb4'a' collate utf8mb4_test_400_ci)) AS hex_ws; | ||
| SELECT hex(weight_string(convert(_utf32 0x10002 using utf8mb4) collate utf8mb4_test_400_ci)) AS hex_ws; |
There was a problem hiding this comment.
please don't add random AS clauses to existing tests.
There was a problem hiding this comment.
Why is it random? It fixes exactly the problem pointed out in the bug report.
| FROM t1 ORDER BY a, BINARY(a); | ||
| SELECT HEX(WEIGHT_STRING(a)) as wa, | ||
| GROUP_CONCAT(HEX(CONVERT(a USING ucs2)) ORDER BY LENGTH(a), BINARY a) | ||
| GROUP_CONCAT(HEX(CONVERT(a USING ucs2)) ORDER BY LENGTH(a), BINARY a) AS gc |
There was a problem hiding this comment.
no need for that. It's easier to read when the expression is printed in the result file.
There was a problem hiding this comment.
How do you fix view-protocol mode otherwise?
The test innodb.innodb_ctype_ldml was failing in view-protocol mode due to different column naming behavior for complex expressions. Without explicit column aliases, view-protocol mode generates automatic names (Name_exp_1, Name_exp_2) while normal mode uses the full expression as the column name. Add explicit column aliases to SELECT statements in innodb_ctype_ldml to ensure consistent column names across both normal and view-protocol modes. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
Description
The test
innodb.innodb_ctype_ldmlwas failing in view-protocol mode due to different column naming behavior for complex expressions.Without explicit column aliases, view-protocol mode generates automatic names (
Name_exp_1,Name_exp_2) while normal mode uses the full expression as the column name.Add explicit column aliases to
SELECTstatements ininnodb_ctype_ldmlto ensure consistent column names across both normal and view-protocol modes.Release Notes
N/A
How can this PR be tested?
Execute the test
innodb_ctype_ldmlin the innodb suite using--view-protocol.Before the fix
The test fails due to result length mismatches.
After the fix
The test passes.
Basing the PR against the correct MariaDB version
Copyright
All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.