From: Simonov D. (JIRA) <tr...@fi...> - 2013-09-22 12:51:27
|
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 |