firebird icon indicating copy to clipboard operation
firebird copied to clipboard

Text literals with actual len >= 65534 characters (ascii-only) are displayed in SQLDA with len = 65533

Open pavel-zotov opened this issue 2 years ago • 3 comments

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

pavel-zotov avatar Dec 11 '23 14:12 pavel-zotov

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 avatar Dec 12 '23 10:12 mrotteveel

@mrotteveel https://github.com/FirebirdSQL/firebird/issues/1944 @pavel-zotov You may find the answer in the same ticket

dyemanov avatar Dec 12 '23 11:12 dyemanov

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)

pavel-zotov avatar Dec 12 '23 11:12 pavel-zotov