Issue Details (XML | Word | Printable)

Key: CORE-1507
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Claudio Valderrama C.
Reporter: Claudio Valderrama C.
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

isql linecount facility in scripts goes out of sync after an INPUT command.

Created: 12/Sep/07 10:45 PM   Updated: 12/Nov/09 03:44 PM
Component/s: ISQL
Affects Version/s: 2.0.0, 2.0.1, 2.1 Alpha 1, 2.1 Beta 1, 2.0.2, 2.0.3
Fix Version/s: 2.5 Alpha 1

Time Tracking:
Original Estimate: 3 hours
Original Estimate - 3 hours
Remaining Estimate: 3 hours
Remaining Estimate - 3 hours
Time Spent: Not Specified
Remaining Estimate - 3 hours

Environment: Platform independent.


 Description  « Hide
When running a script, isql v2.X has a feature that tries to identify the line of an error, relative to the script, since FB error messages are relative to each command. The typical output is
-At line L, column C -> end of translated message from the server
At line SL in file <script_filename>
This is even more useful when running nested scripts, namely some scripts than in turn have INPUT commands that load other scripts.

This is an example of the current failure. The db used is irrelevant, since we need any db to query for something that doesn't exist:
F:\fb2dev\fbbuild\firebird2\temp\debug\firebird\bin>isql qi.fdb -i i1.txt
Statement failed, SQLCODE = -204
Dynamic SQL Error
-SQL error code = -204
-Table unknown
-CATS
-At line 1, column 15
At line 1 in file i5.txt
Statement failed, SQLCODE = -204
Dynamic SQL Error
-SQL error code = -204
-Table unknown
-CATS
-At line 2, column 2
At line 2 in file i1.txt <-----

In the second case, the error should be:
Statement failed, SQLCODE = -204
Dynamic SQL Error
-SQL error code = -204
-Table unknown
-CATS
-At line 2, column 2
At line 4 in file i1.txt <------

The sample scripts follow.

i1.txt is:
input
i5.txt;
select 0 from
 cats;

i5.txt is:
select 0 from cats; <no newline at the end>


 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.