Confusing message (conversion error from STRING " ") when use parametrized ES and "?" has no explicit CAST() ------------------------------------------------------------------------------------------------------------
Key: CORE-6463 URL: http://tracker.firebirdsql.org/browse/CORE-6463 Project: Firebird Core Issue Type: Improvement Affects Versions: 3.0.7, 4.0 Beta 2 Reporter: Pavel Zotov Priority: Minor Run this on 2.5, 3.x and 4.x: ======= set sqlda_display on; set term ^; execute block returns(o_rel_id int) as begin execute statement ('select iif(1 <= ?, ?, null) from rdb$database') (2, 3) into o_rel_id; suspend; end ^ set term ;^ Output: 1) on 2.5: INPUT SQLDA version: 1 sqln: 10 sqld: 0 OUTPUT SQLDA version: 1 sqln: 20 sqld: 1 01: sqltype: 497 LONG Nullable sqlscale: 0 sqlsubtype: 0 sqllen: 4 : name: (8)O_REL_ID alias: (8)O_REL_ID : table: (0) owner: (0) O_REL_ID ============ Statement failed, SQLSTATE = HY004 Dynamic SQL Error -SQL error code = -804 -Data type unknown -At block line: 3, col: 5 2) on 3.x and 4.x: INPUT message field count: 0 OUTPUT message field count: 1 01: sqltype: 496 LONG Nullable scale: 0 subtype: 0 len: 4 : name: O_REL_ID alias: O_REL_ID : table: owner: O_REL_ID ============ Statement failed, SQLSTATE = 22018 conversion error from string " " -At block line: 3, col: 5 One need to know in advance that NULL w/o CAST() is considered as CHAR(1), but i could not find this in the $FB_HOME/doc/* and in https://www.firebirdsql.org/file/documentation/html/en/firebirddocs/nullguide/firebird-null-guide.html Phrase: conversion error from string " " -- definitely looks weird (there is no any text variables / parameters in this example). Perhaps, it will be better to change this message back to 2.5.x ? -- 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 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel