run-time error if (f1()) if f1 returns a boolean
------------------------------------------------
Key: CORE-4234
URL: http://tracker.firebirdsql.org/browse/CORE-4234
Project: Firebird Core
Issue Type: Bug
Affects Versions: 3.0 Alpha 1
Reporter: Simonov Denis
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect 'localhost/3051:horses' user 'sysdba' password 'masterkey';
Database: 'localhost/3051:horses', User: sysdba
SQL> set term ^;
SQL> execute block
CON> returns (c integer)
CON> as
CON> DECLARE VARIABLE b boolean;
CON> DECLARE function f1() returns boolean as
CON> begin
CON> return true;
CON> end
CON> begin
CON> c = 0;
CON> b = f1();
CON> --IF (f1()) THEN c = 1;
CON> IF (b) THEN c = 1;
CON> suspend;
CON> end^
C
============
1
SQL> execute block
CON> returns (c integer)
CON> as
CON> DECLARE VARIABLE b boolean;
CON> DECLARE function f1() returns boolean as
CON> begin
CON> return true;
CON> end
CON> begin
CON> c = 0;
CON> b = f1();
CON> IF (f1()) THEN c = 1;
CON> --IF (b) THEN c = 1;
CON> suspend;
CON> end^
Statement failed, SQLSTATE = 22000
Dynamic SQL Error
-SQL error code = -104
-Invalid usage of boolean expression
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13.
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel