Database file grow too when execute operations with blob type variables in SPs.
-------------------------------------------------------------------------------

                 Key: CORE-4109
                 URL: http://tracker.firebirdsql.org/browse/CORE-4109
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 2.1.5 Update 1
         Environment: Windows XP SP3/Vista/7/8 32 | 64 bits, Firebird 
2.1.518497, IBExpert 20130220
            Reporter: Martin A. Lara V.
            Priority: Critical


Do the folllowing:

1. Create a database. Product of this step we obtain a database of 2464 KB.

2. Create the next SP:

CREATE PROCEDURE "BLOB_Case_SP"

AS

DECLARE VARIABLE i INTEGER;
DECLARE VARIABLE fmemo BLOB SUB_TYPE TEXT SEGMENT SIZE 80;

BEGIN

  fmemo = '';

  i = 1;
  WHILE (i < 1280) DO BEGIN

    fmemo = fmemo || '1*2*3*4*5*6*7*8*';

    i = i + 1;
  END

END

// Obs. We use a blob type variable, sub_type text. Then we built a string 
using successive concatenations (eg. 1280) always adding a string of length 16.

3. Execute the SP:

EXECUTE BLOB_CASE_SP;

Results:

We obtain the next error message: "unknow ISC error 0." and the database size 
increased to 11472 KB.

Now, if we replace in the SP the line:

    fmemo = fmemo || '1*2*3*4*5*6*7*8*';

by this lines:

    fmemo = fmemo || '1*';
    fmemo = fmemo || '2*';
    fmemo = fmemo || '3*';
    fmemo = fmemo || '4*';
    fmemo = fmemo || '5*';
    fmemo = fmemo || '6*';
    fmemo = fmemo || '7*';
    fmemo = fmemo || '8*';

and we do it all from scratch, we obtain the same error message and a database 
file of 74384 KB!

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

        

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to