Length of INPUT parameter in SQLDA depends on whether it is enclosed in
COALESCE() or no.
-----------------------------------------------------------------------------------------
Key: CORE-6187
URL: http://tracker.firebirdsql.org/browse/CORE-6187
Project: Firebird Core
Issue Type: Bug
Reporter: Pavel Zotov
Consider following script:
==========
set bail on;
set echo on;
shell del c:\temp\tmp4test.tmp 2>nul;
set names win1251;
create database 'localhost:c:\temp\tmp4test.tmp' user sysdba password
'masterkey';
show version;
create domain dm_txt as varchar(24);
create table phones(prefix dm_txt);
commit;
set planonly;
set sqlda_display on;
select 1 from phones p where coalesce(right(p.prefix, 3), '') = ? ;
select 1 from phones p where coalesce(right(p.prefix, 3), '') = coalesce( ? ,
'') ;
set sqlda_display off;
set planonly;
commit;
drop database;
============
It will produce :
1) on WI-V3.0.5.33166 (date of snapshot: 05-sep-2019):
=====
INPUT message field count: 1
01: sqltype: 448 VARYING Nullable scale: 0 subtype: 0 len: 24 charset: 52
WIN1251 ------ NOTE: LEN=24 (expected)
. . .
INPUT message field count: 1
01: sqltype: 452 TEXT Nullable scale: 0 subtype: 0 len: 0 charset: 52 WIN1251
-------------- NOTE: LEN=0 (why ?)
=====
(the same on WI-T4.0.0.1646, date: 09-nov-2019)
2) on WI-V3.0.5.33162 (date of snapshot: 30-aug-2019)
=====
INPUT message field count: 1
01: sqltype: 448 VARYING Nullable scale: 0 subtype: 0 len: 24 charset: 52
WIN1251
. . .
INPUT message field count: 1
01: sqltype: 448 VARYING Nullable scale: 0 subtype: 0 len: 24 charset: 52
WIN1251 -- OK, expected
=====
--
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