Issue Details (XML | Word | Printable)

Key: CORE-5783
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Polesov
Votes: 0
Watchers: 4
Operations

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

execute statement ignores the text of the SQL-query after a comment of the form "-"

Created: 29/Mar/18 08:54 AM   Updated: 07/Apr/18 06:46 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0.4, 4.0 Beta 1

QA Status: Done successfully


 Description  « Hide
If the text of the SQL query executed in the execute statement contains comments "-", then starting with the "-" characters, all text is ignored to the end.

For example:

create or alter procedure STMT_ERR
returns (
    LEN integer,
    NAME varchar(100))
as
  declare variable SQL blob;
begin
  SQL =
'select RDB$FIELD_LENGTH, RDB$FIELD_NAME
  from RDB$FIELDS
 where not RDB$FIELD_NAME is null
-- comment
   and RDB$FIELD_LENGTH > 2
 order by RDB$FIELD_LENGTH
';

  for
    execute statement ( :SQL )
    into :LEN, :NAME
  do
    suspend;
end


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun made changes - 29/Mar/18 09:14 AM
Field Original Value New Value
Assignee Vlad Khorsun [ hvlad ]
Vlad Khorsun made changes - 02/Apr/18 10:04 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 4.0 Beta 1 [ 10750 ]
Fix Version/s 3.0.4 [ 10863 ]
Resolution Fixed [ 1 ]
Pavel Zotov made changes - 05/Apr/18 01:54 PM
Status Resolved [ 5 ] Resolved [ 5 ]
QA Status No test Done successfully
Pavel Zotov made changes - 05/Apr/18 01:54 PM
Status Resolved [ 5 ] Closed [ 6 ]