SUBSTRING: change type of `startpos` and `FOR-length` arguments to BIGINT
--------------------------------------------------------------------------
Key: CORE-4892
URL: http://tracker.firebirdsql.org/browse/CORE-4892
Project: Firebird Core
Issue Type: Improvement
Components: Engine
Reporter: Pavel Zotov
Currently documentation (
http://www.firebirdsql.org/refdocs/langrefupd25-intfunc-substring.html ) issues
that "this function fully supports binary and text BLOBs of ___any___ length
and character set" (note on emphasized "any").
This is false in case when there is text blob of length more than 2 Gb.
I've created such blob by fill GTT tables with result of
RECREATE SEQUENCE G;
RECREATE GLOBAL TEMPORARY TABLE GTT(BLOB_FLD BLOB) ON COMMIT DELETE ROWS;
SELECT LIST( gen_id( g, 1 ) ) FROM RDB$TYPES,RDB$TYPES,RDB$TYPES,(SELECT 1 k
FROM RDB$TYPES ROWS 15);
-- and after that blob_fld will have length 2'346'948'497 bytes.
Exception:
===
Statement failed, SQLSTATE = 22003
arithmetic exception, numeric overflow, or string truncation
-numeric value is out of range
==
-- raises when trying to do:
select substring( bob_field from 2147483649 for 1); // NOTE: exception does NOT
appear when 2nd arg = 2147483648, i.e. exact power(2, 31) from gtt;
select substring( bob_field from 2147483647 for 2147483648) from gtt;
It will be nice if we'll have new implementation of substring (and all other
functions for string handling) that will be able to operate with blobs which
length more than 2Gb.
--
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