You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "thswlsqls (via GitHub)" <gi...@apache.org> on 2026/07/15 04:01:58 UTC

[I] MySQL dialect exception mapper does not map ColumnNotFoundException to a MySQL error [shardingsphere]

thswlsqls opened a new issue, #39124:
URL: https://github.com/apache/shardingsphere/issues/39124

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   master @ 6778bfbe08c
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   Proxy
   
   ### Expected behavior
   When a `ColumnNotFoundException` reaches the MySQL frontend, the client should receive MySQL error 1054 (SQLState `42S22`) with message `Unknown column '%s' in '%s'`, matching the native server and the PostgreSQL dialect mapper.
   
   ### Actual behavior
   `MySQLDialectExceptionMapper.convert()` has no branch for `ColumnNotFoundException`, so it falls back to `UnknownSQLException`, surfacing a generic HY000 error with vendor code 30000 instead of the proper column-not-found error.
   
   ### Reason analyze (If you can)
   The core `ColumnNotFoundException` is a `SQLDialectException` thrown on a normal path (e.g. `MySQLComStmtPrepareParameterMarkerExtractor`). The sibling PostgreSQL mapper already maps it to `UNDEFINED_COLUMN`; only MySQL is missing the mapping, so it reaches the fallback in `MySQLDialectExceptionMapper.convert()`.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   Over ShardingSphere-Proxy (MySQL), prepare a statement whose parameter marker references an unknown column so `ColumnNotFoundException` is raised; observe the generic HY000 error instead of 1054/`42S22`.
   
   ### Example codes for reproduce this issue (such as a github link).
   N/A
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] MySQL dialect exception mapper does not map ColumnNotFoundException to a MySQL error [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #39124: MySQL dialect exception mapper does not map ColumnNotFoundException to a MySQL error
URL: https://github.com/apache/shardingsphere/issues/39124


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org