我正在尝试执行一个创建过程并执行它的 sql 脚本。我通过从 mysql 客户端手动运行该过程来验证该过程。但是当使用下面的脚本时会出错。
我的蚂蚁脚本是
<sql driver="${mysql.driver.string.DE}" url="jdbc:mysql://${database.host}:${database.port}/${database.name}" userid="${database.username}" password="${database.password}" onerror="continue" delimiter="$$" delimitertype="row" keepformat="yes" rdbms="mysql">
<transaction src="${mysql.dbupgrade.sql.dir.DE}/fixDuplicateClassNames.sql" />
<transaction>commit;</transaction>
<classpath>
<fileset dir="${lib.dir.DE}">
<include name="*.jar" />
</fileset>
</classpath>
</sql>
运行脚本时抛出的错误是
java.sql.SQLException: Syntax error or access violation message from server: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER $;