Content

一次数据库查询超时优化问题的实战记录(数据库查询超时时间)居然可以这样

文章摘要

这篇文章描述了一种MySQL数据库连接错误,主要错误类型为`com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Unsupported command`,并提示在SQL语句中存在不支持的命令或语法问题。错误可能与配置文件中的参数映射表(如`mapper/XXXXXXXXX-Mapper.xml`或`mapper/XXXXXXXXXOMapper.xml`)设置或SQL语句中的命令不兼容有关。文章建议检查SQL语句中的语法问题,确保所有命令都被支持,并验证配置文件中的参数映射表设置是否正确。

 ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Unsupported command ### The error may exist in class path resource [mapper/XXXXXXXXX-Mapper.xml] ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: select t3.cino, t2.sn as orderSn, t2.provider_id as providerId, t4.logistics_no as logisticsSn, t2.`name`, ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Unsupported command ; Unsupported command; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Unsupported command org.springframework.dao.DataAccessResourceFailureException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Unsupported command ### The error may exist in class path resource [mapper/XXXXXXXXXOMapper.xml] ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: select t3.cino, t2.sn as orderSn, t2.provider_id as providerId, t4.logistics_no as logisticsSn, ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Unsupported command