ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <>
Subject RE: <SQL> can't execute a ${property}?
Date Mon, 03 Nov 2003 09:02:47 GMT
The MySQL JDBC driver doesn't like multiple commands on the same line, that's what. Although
you can do this from the MySQL command-line client. Seems strange to me that it works if you
separate your commands onto multiple lines, but if it works for you ...

-----Original Message-----
Sent: 01 November 2003 05:00
Subject: RE: <SQL> can't execute a ${property}?

No dice.  Here is the exact task I'm running:

    <property name="testql" value="DROP TABLE countydata; DROP TABLE


And the output:

      [sql] Executing commands
      [sql] Failed to execute:
      [sql] DROP TABLE countydata; DROP TABLE airport
      [sql] java.sql.SQLException: Syntax error or access violation,
message from server: "You have
 an error in your SQL syntax near '; DROP TABLE airport' at line 2"
      [sql] 0 of 1 SQL statements executed successfully

I get the same error if I copy put the query string itself inside the <sql>
task; but if I follow the first semicolon with a newline, it works fine.  So
*something* doesn't like multiple commands on the same line.  But what?
Who's parsing the SQL before it goes to MySQL?  And why does sourcing from a
file work fine?


// William R. Zwicky
// USA-CERL  (217) 352-6511 x7405
// Champaign, IL

> -----Original Message-----
> From: W. Sean Hennessy [] 
> Sent: Thursday, October 30, 2003 10:35 AM
> To: 'Ant Users List'
> Subject: RE: <SQL> can't execute a ${property}?
> <interesting suggestions>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message