views:

91

answers:

0

I have an SQL script and want to apply it witn ANT task. This script clears out schema, creates new tables and views.

The ANT defined task as follows:

<sql driver="com.mysql.jdbc.Driver"
        url="jdbc:mysql://host:3306/smth"
        userid="smth"
        password="smth"
        expandProperties="false"
        autocommit="true"             
        src="all.sql"
         >
</sql>

When this task launches, it shows in log that tables are cleared and created. But when it tries to create first view, it fails with:

Failed to execute:  CREATE VIEW component... AS SELECT component_raw.id AS
MySQLSyntaxErrorException: Table 'component_raw' doesn't exist

I have no idea why it fails here. Running this all.sql from MySQL query browser gives no errors. When I launched ANT with -v option, I didn't see any "COMMIT" messages..

Please, help to resolve the problem.