ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43413] New: - ant sql task tries to execute commented lines with keepformat="true" and fails
Date Tue, 18 Sep 2007 07:26:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43413>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43413

           Summary: ant sql task tries to execute commented lines with
                    keepformat="true" and fails
           Product: Ant
           Version: 1.7.0
          Platform: Other
        OS/Version: Windows NT
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: barahlo@hot.ee


SQL task manual (http://ant.apache.org/manual/CoreTasks/sql.html) states, 
that "...Multiple statements can be provided, separated by semicolons (or the 
defined delimiter). Individual lines within the statements can be commented 
using either --, // or REM at the start of the line..."

Having keepformat="true", ant sql task attempts to execute commented lines and 
fails.

<target name="sql.test">
    <sql driver="${database.driver}" 
        url="${database.url}" 
        userid="${database.user_name}" 
        password="${database.user_pwd}"
        classpathref="classpath-database"
        keepformat="true"
    >
        <transaction>
            REM test
        </transaction>
    </sql>
</target>

Results in:
java.sql.SQLException: ORA-00900: invalid SQL statement

With other types of comments
<transaction>--test</transaction>
and
<transaction>//test</transaction>
execution results in:
java.sql.SQLException: Invalid SQL type

Having keepformat="false" all calls succeed.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message