Skip to content
/ server Public

Conversation

@FarihaIS
Copy link
Contributor

@FarihaIS FarihaIS commented Jan 29, 2026

Description

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.

Release Notes

N/A

How can this PR be tested?

Execute the test innodb_ctype_ldml in the innodb suite using --view-protocol.

Before the fix

The test fails due to result length mismatches.

innodb.innodb_ctype_ldml                 [ fail ]
        Test ended at 2026-01-29 00:22:05

CURRENT_TEST: innodb.innodb_ctype_ldml
--- /quick-rebuilds/mariadb/mysql-test/suite/innodb/r/innodb_ctype_ldml.result  2026-01-29 00:21:51.522139461 +0000
+++ /quick-rebuilds/mariadb/mysql-test/suite/innodb/r/innodb_ctype_ldml.reject  2026-01-29 00:22:04.562427117 +0000
@@ -453,7 +453,7 @@
 set @@character_set_results=NULL;
 select * from t1;
 Catalog        Database        Table   Table_alias     Column  Column_alias    Type    Length  Max length      Is_null Flags   Decimals        Charsetnr
-def    test    t1      t1      c1      c1      254     2       2       Y       0       0       359
+def    test    mysqltest_tmp_v mysqltest_tmp_v c1      c1      254     2       2       Y       0       0       359
 c1
  drop table t1;
@@ -473,7 +473,7 @@
 hex(weight_string(_utf8mb4'a' collate utf8mb4_test_400_ci))
 0E33
 SELECT hex(weight_string(convert(_utf32 0x10002 using utf8mb4) collate utf8mb4_test_400_ci));
-hex(weight_string(convert(_utf32 0x10002 using utf8mb4) collate utf8mb4_test_400_ci))
+Name_exp_1
 FFFD
 SELECT hex(@a:=convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_400_ci), hex(lower(@a));
 hex(@a:=convert(_utf32 0x10400 using utf8mb4) collate utf8mb4_test_400_ci)     hex(lower(@a))
@@ -951,7 +951,7 @@
 SELECT HEX(WEIGHT_STRING(a)) as wa,
 GROUP_CONCAT(HEX(CONVERT(a USING ucs2)) ORDER BY LENGTH(a), BINARY a)
 FROM t1 GROUP BY a ORDER BY a;
-wa     GROUP_CONCAT(HEX(CONVERT(a USING ucs2)) ORDER BY LENGTH(a), BINARY a)
+wa     Name_exp_2
 15A2   0985
 15A3   0986
 15A4   0987

Result length mismatch

After the fix

The test passes.

innodb.innodb_ctype_ldml                 [ pass ]

Basing the PR against the correct MariaDB version

  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

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.

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.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants