-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
execute delete sql for Sqlserver2014 by mybatis
SQL:
delete from mas_forbiddenMobile with(rowlock) where forbiddenMobile=#{mobile}
it throw exception. delete sql is not supported with 'with(rowlock)'
Affected Version
all Druid version. Latest version 1.2.6
Description
SqlServer 2014
Druid 1.2.6
jdbc mssql-jdbc-9.2.1.jre8
org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: java.sql.SQLException: sql injection violation, dbType sqlserver, , druid-version 1.2.5, syntax error: syntax error, error in :'with(rowlock) where forbiddenMobile', expect AS, actual null, pos 44, line 1, column 38, token IDENTIFIER rowlock : delete from mas_forbiddenMobile with(rowlock) where forbiddenMobile=?
The error occurred while executing an update ### SQL: delete from mas_forbiddenMobile with(rowlock) where forbiddenMobile=? ### Cause: java.sql.SQLException: sql injection violation, dbType sqlserver, , druid-version 1.2.6, syntax error: syntax error, error in :'with(rowlock) where forbiddenMobile', expect AS, actual null, pos 44, line 1, column 38, token IDENTIFIER rowlock : delete from mas_forbiddenMobile with(rowlock) where forbiddenMobile=?