SIMILAR-TO leads FB to crash when checking blob with size > 2Gb for matching to 
string literal
----------------------------------------------------------------------------------------------

                 Key: CORE-4893
                 URL: http://tracker.firebirdsql.org/browse/CORE-4893
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 3.0 RC 1
            Reporter: Pavel Zotov


Doing on LI-V3.0.0.31942 SuperClassic, database with FW = OFF, FB config:
===
Servermode = SuperClassic
RemoteServicePort = 3330
DefaultDbCachePages = 512

BugCheckAbort=1

AuthClient = Legacy_Auth,Srp,Win_Sspi
AuthServer = Legacy_Auth,Srp
UserManager = Legacy_UserManager
WireCrypt = Disabled

ExternalFileAccess = Restrict /var/db/fb30
FileSystemCacheThreshold = 65536K

LockMemSize = 64M
LockHashSlots = 22111

MaxUserTraceLogSize = 99999
TempCacheLimit = 2147483647
#TempDirectories = /dev/shm;/tmp
TempDirectories = /tmp/firebird
===

Test:
####

recreate global temporary table gtt(b blob);
recreate sequence g;
commit;
insert into gtt(b) select list( gen_id( g, 1 ) )
from rdb$types,rdb$types,rdb$types,(select 1 k from rdb$types rows 15);
select char_length(b) from gtt;

          CHAR_LENGTH
=====================
           2346948497

SQL> select gen_id(g,0) from rdb$database;

               GEN_ID
=====================
            245805960

SQL> select 1 from gtt where b like '%,245805959,%';

    CONSTANT
============
           1

SQL> select 1 from gtt where b similar to '%,2,%'; ----------- worked VERY 
slowly, was interrupted by Ctrl-C
^C
    CONSTANT
============
Statement failed, SQLSTATE = HY008
operation was cancelled
SQL> select 1 from gtt where b similar to '%,2,%'; ---------- was NOT 
interrupted, but after ~2 minutes produced:

    CONSTANT
============
Statement failed, SQLSTATE = 08006
Error reading data from the connection.


Result is reproduced also if cancel last query by Ctrl-C -- see two attached 
files with stack-trace.

-- 
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

Reply via email to