Text literals with actual len >= 65534 characters (ascii-only) are displayed in SQLDA with len = 65533
Perhaps this problem relates to #3923 (which is about literals with len <= 32767), but that ticket is too old, so it seems better to me start new one. Consider script from literal: it starts with four string literals which length = 32765 ... 32768. No problems with them.
But for literals with length = 62532 ... 62535 one can see following:
01: sqltype: 452 TEXT scale: 0 subtype: 0 len: 65532 charset: 0 NONE
01: sqltype: 452 TEXT scale: 0 subtype: 0 len: 65533 charset: 0 NONE
01: sqltype: 452 TEXT scale: 0 subtype: 0 len: 65533 charset: 0 NONE
01: sqltype: 452 TEXT scale: 0 subtype: 0 len: 65533 charset: 0 NONE
So, when len >= 65534 then we can not rely on SQLDA info about actual len. SQLDA-for-long-text-literals.sql.zip
Maybe I've missed something, but I thought we only supported char literals up to 32767 characters. I thought longer string literals were supported only in blob assignment contexts.
@mrotteveel https://github.com/FirebirdSQL/firebird/issues/1944 @pavel-zotov You may find the answer in the same ticket
From this note (by Adriano): https://github.com/FirebirdSQL/firebird/issues/1944#issuecomment-826189799 -- it follows that such behavior is expected ? (the only difference with old FB is that currently there is no runtime error for such long literals)