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 26459] New: - SQL task (SQLExec class) might not see a ROW delimiter correctly
Date Tue, 27 Jan 2004 10:39:47 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26459>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26459

SQL task (SQLExec class) might not see a ROW delimiter correctly

           Summary: SQL task (SQLExec class) might not see a ROW delimiter
                    correctly
           Product: Ant
           Version: 1.6.0
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: matthieu.recouly@laposte.net


Hi,

In the SQL task, using the option "keepformat" will prevent SQL statements lines
from having their spaces trimed out.

This can prevent ANT from seing a ROW delimiter, which is being found only if an
entire line equals the delimiter.

In example, if I write the following with the options 'delimiter' set to 'GO',
'delimitertype' set to 'row', and 'keepformat' set to 'true':

SELECT * ... FROM ...
GO  

And I put one or more spaces after the 'GO' statement, then it will not trigger
sending of the 'SELECT' statement to the database.

A simple solution would be changing source code of SQLExec class, and replace
lines from method 'runStatements':

(delimiterType.equals(DelimiterType.ROW)
&& line.equals(delimiter)))

by

(delimiterType.equals(DelimiterType.ROW)
&& line.trim().equals(delimiter)))


Regards,

Matthieu Recouly

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


Mime
View raw message