Skip to content

[Bug]: MySQL-compatible parser rejects valid unquoted Unicode identifiers #26715

Closed

Description

@iamlinjunhong

Is there an existing issue for the same bug?

  • I searched open and closed issues for Unicode, non-ASCII, unquoted identifiers, and ODBC; no matching issue was found.

Branch Name

main

Commit ID

ace13bf

Other Environment Information

  • macOS arm64
  • Local LOG/TN/CN cluster built from the commit above
  • MySQL protocol client with utf8mb4
  • MatrixOne ODBC 9.7 Unicode driver through unixODBC

Actual Behavior

MatrixOne rejects an unquoted identifier containing U+00E3 even though that character is valid in an unquoted MySQL identifier:

CREATE DATABASE IF NOT EXISTS unicode_identifier_repro;
USE unicode_identifier_repro;
DROP TABLE IF EXISTS t_ãg;
CREATE TABLE t_ãg (a INT);

Result:

ERROR 1064 (HY000): SQL parser error ... syntax error ... near "ãg (a INT)"

The same failure is visible through the public Unicode ODBC path:

SQLExecDirectW(stmt, L"CREATE TABLE t_ãg (a INT)", SQL_NTS);

Result:

SQLSTATE=42000 native=1064 SQL parser error ...

This causes 7 metadata/catalog cases in the upstream Connector/ODBC my_unicode suite to fail before the ODBC APIs can be exercised (SQLStatistics, SQLColAttribute, SQLDescribeCol, SQLColumns, SQLTables, SQLSpecialColumns, and SQLPrimaryKeys).

Expected Behavior

MySQL permits extended BMP characters U+0080 through U+FFFF in unquoted identifiers. U+00E3 should therefore parse without backticks in MatrixOne compatibility mode.

MySQL reference: https://dev.mysql.com/doc/refman/8.0/en/identifiers.html

Steps to Reproduce

mysql --default-character-set=utf8mb4 \
  -h127.0.0.1 -P16001 -uroot -p111 \
  -e "CREATE DATABASE IF NOT EXISTS unicode_identifier_repro; \
      CREATE TABLE unicode_identifier_repro.t_ãg (a INT);"

Reproduced repeatedly through both the native MySQL protocol client and SQLExecDirectW.

Control

Quoting the same identifier succeeds and preserves the name:

CREATE TABLE `t_ãg` (a INT);
SHOW TABLES LIKE "t_%";
DROP TABLE `t_ãg`;

This isolates the bug to unquoted Unicode identifier tokenization rather than UTF-8 transport, catalog storage, or ODBC conversion.

Activity

  1. self-assigned this
    on Aug 5, 2026
  2. iamlinjunhong commented on Aug 12, 2026

    @iamlinjunhong
    ContributorAuthor

    在最新 main 9a7c98b 上重新构建并于 2026-08-12 复测,问题仍可稳定复现:通过 MatrixOne ODBC Unicode 驱动执行未加反引号的 U+00E3 标识符仍返回 SQLSTATE 42000 / native 1064。相同深测中的带反引号 Unicode 标识符正常。

    因此当前 CLOSED/COMPLETED 状态与 main 实测不一致,请重新打开并确认修复提交是否已合入 main。

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

Metadata

Metadata

Assignees

Labels

area/compatibilitykind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions