Issue Type: Bug Bug
Affects Versions: 1.5
Assignee: Unassigned
Created: 06/Mar/13 3:01 PM
Description:

When passing two statements the MySQL driver complains:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'INSERT INTO User VALUES(UUID(),NOW(),

Here are the two SQL statements:

<sqlCommand>DELETE FROM User WHERE username="$

{mysql.user}";INSERT INTO User VALUES(UUID(),NOW(),"${mysql.user}

@mms_dresden.de","$

{mysql.user}","MMS","9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","${mysql.user}

")</sqlCommand>

Executing each SQL command on its own is working.

Here is the complete plugin configuration:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<version>1.5</version>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.9</version>
</dependency>
</dependencies>
<configuration>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://$

{mysql.server}

:$

{mysql.port}

/$

{mysql.database}

</url>
<username>$

{mysql.user}</username>
<password>${mysql.password}</password>
<delimiter>;</delimiter>
<sqlCommand>DELETE FROM User WHERE username="${mysql.user}

";INSERT INTO User VALUES(UUID(),NOW(),"$

{mysql.user}@mms_dresden.de","${mysql.user}

","MMS","9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","$

{mysql.user}

")</sqlCommand>
</configuration>
</plugin>

Environment: Window 7, Java 1.7, Maven 3.0.3
Project: Maven 2.x SQL Plugin
Priority: Critical Critical
Reporter: Karsten Ohme
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to