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
There are no subversion log entries for this issue yet.