mysql 进程语句 ant执行脚本出错 高手请进

下面是一个mysql进程的demo,在Mysql Query Browser可以成功执行。到了 **.sql文件里,用ant执行却报错。

drop table IF exists `attachment`;

create table attachment (
id int not null auto_increment,
title varchar(50) not null,
description varchar(255) not null,
primary key (id)
) type = InnoDB;

drop procedure if exists delete_attachment;
DELIMITER \\
create procedure delete_attachment
  (in noteId integer)
begin
  delete from attachment where id = noteId;
end
\\

我的ant代码可以成功执行其它mysql脚本,唯独进程报错。代码如下

<target name="db-schema" depends="" description="creates table schemas for ${database.type}">
<echo level="debug">${database.jar}</echo>
<echo message="Detected MySQL server, creating schemas..." />
<sql driver="${database.driver.class}" url="${database.user.url}" userid="${database.username}" password="${database.password}" encoding="utf-8">
<classpath>
<pathelement location="${database.jar}" />
</classpath>
<fileset dir="database/">
<include name="${database.type}-schema.sql" />
</fileset>
</sql>
</target>

你可能感兴趣的:(sql,mysql,ant,脚本)