<!-- ❌ 不要在这里问问题❗️ ⭕️ 请使用英文将您的问题发送到邮件列表: https://groups.google.com/group/mybatis-user 或在 Stack Overflow 进行提问,并带上 'mybatis' 标签: https://stackoverflow.com/questions/ask?tags=mybatis 在这里的提问将会被直接关闭。 Question? ====================== Please use the mailing list. https://groups.google.com/group/mybatis-user Or Stack Overflow with 'mybatis' tag. https://stackoverflow.com/questions/ask?tags=mybatis Questions on this tracker will be closed without comment. Bug report? ====================== Please fill out the BUG REPORT FORM below. To fix a bug, we need to reproduce it first. And we spend a lot of time just trying to reproduce the reported problem, so please consider creating a failing test case or an example project. - How to create a test case : https://github.com/mybatis/mybatis-3/wiki/Unit-Test - How to create a good example : http://sscce.org - How to upload your project to GitHub: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ Feature request? ======================= - Please delete the BUG REPORT FORM below and describe the feature. - It is a good idea to discuss your changes on the mailing list to get feedback from the community. https://groups.google.com/group/mybatis-user - If you have a patch with unit tests, send a pull request. Please see the wiki page : https://github.com/mybatis/mybatis-3/wiki/Contribute --> <!-- BUG REPORT FORM --> ## MyBatis version 3.5.15 ## Database vendor and version 5.7.42 ## Test case or example project xml sql is "select (case when subject_name='aaa[张三]' then subject_name else null end) as subject_name from als_core_p" ## Steps to reproduce To execute directly through MyBatis, it means executing database operations through MyBatis without any intermediate processes. ## Expected result have result ## Actual result org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.NumberFormatException: For input string: "张三"