05.09.2019 18:27, Adriano dos Santos Fernandes wrote:
Hi!

Lock manager has dev. build checkLength that asserts for lck_length <=
MAX_UCHAR.

Max identifier length is 63 characters, which may be multiplied by 4 in
utf8 bytes.

get_dsql_cache_item may create keys with 506 bytes.

lck_length is USHORT.

Is the assertion wrong or do we have bigger problem?

// Lock block

struct lbl
{
        UCHAR lbl_type;                                 // mem tag: type_lbl=in 
use, type_null=free
        UCHAR lbl_state;                                // High state granted
        UCHAR lbl_size;                                 // Key bytes allocated
        UCHAR lbl_length;                               // Key bytes used

  So, assertion is correct and we should have a problem with a long keys

BTW, long keys makes lookup operations more heavy, do we really need it ?

Regards,
Vlad


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to