"Invalid BLOB ID" error
-----------------------

                 Key: CORE-5078
                 URL: http://tracker.firebirdsql.org/browse/CORE-5078
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 2.5.5, 2.5.4, 2.5.3 Update 1, 2.5.3, 2.5.2
            Reporter: Pavel Cisar


After we switched couple columns from big varchar to blob one customer
reported 'Invalid BLOB ID' error. Unfortunately we were not able to
notice any pattern to explain what could be causing it thus we were not
able to create test case from scratch. Luckily we were able to strip
client DB down to one simplified SP (and three tables) where it happens
every time for us on 64 bit classic firebird 2.5.5 on windows
(32 bit 2.5.2/3/4/5 fb works fine, 64 bit 2.5.2/3/4/5 on windows and
2.5.3 on linux also generates error here). DB backup file is attached,
executing 'select * from do_changeTxStatus;' causes the error. SP code
and results we get follow below. SP code is made by combining multiple other
SPs and triggers, and then stripped down as much as possible, so the
code may not make any sense, it's just to demonstrate the error

set term ^;
create or alter procedure do_changeTxStatus
returns (info varchar(20), UPDCNT INTEGER, trans integer, subs integer,
MsgType integer, notifyParams integer)
as
  declare variable tmpmessage blob;
begin
  updCnt=0;
  for select trans, subs
    from trans
    order by trans -- or 'subs desc' generates error, 'trans desc' or 'subs' -- 
no error
    into :trans, :subs
  do begin
        for select distinct MsgType --removing distinct eliminates error
            from NotifyParams p
            where sscTableKey = :Subs
            into :MsgType
          do begin
              info='assigning blob';
              suspend;
              tmpmessage='1606=222=333'; -- eliminating temp variable 
eliminates error
              for select p.notifyParams
                 from NotifyParams p
                 where p.sscTableKey = :Subs
                 into :notifyParams
               do begin
                    updCnt=updCnt+1;
                    info='inserting blob';
                    suspend;
                    insert into PendingSC (pendingSc, Priority, CommandBlob)
                      values (GEN_ID(GENID_PENDINGSC, 1), 500, :tmpMessage);
              end
          end
  end
end
^
set term ;^
commit;

select * from do_changeTxStatus;

INFO                       UPDCNT        TRANS         SUBS      MSGTYPE 
NOTIFYPARAMS
==================== ============ ============ ============ ============ 
============
assigning blob                  0      1361557         1449         2525       
<null>
inserting blob                  1      1361557         1449         2525        
  265
assigning blob                  1      1361558         7955         2525        
  265
inserting blob                  2      1361558         7955         2525        
  829
assigning blob                  2      1361563         6707         2525        
  829
inserting blob                  3      1361563         6707         2525        
  597
assigning blob                  3      1361564         1502         2524        
  597
inserting blob                  4      1361564         1502         2524        
  277
inserting blob                  5      1361564         1502         2524        
  278
inserting blob                  6      1361564         1502         2524        
  279
inserting blob                  7      1361564         1502         2524        
 1340
assigning blob                  7      1361564         1502         2525        
 1340
inserting blob                  8      1361564         1502         2525        
  277
inserting blob                  9      1361564         1502         2525        
  278
inserting blob                 10      1361564         1502         2525        
  279
inserting blob                 11      1361564         1502         2525        
 1340
assigning blob                 11      1361566         7021         2525        
 1340
inserting blob                 12      1361566         7021         2525        
  630
assigning blob                 12      1361569         6614         2525        
  630
inserting blob                 13      1361569         6614         2525        
  586
assigning blob                 13      1361570         8303         2525        
  586
inserting blob                 14      1361570         8303         2525        
 1668
assigning blob                 14      1361572         7917         2525        
 1668
inserting blob                 15      1361572         7917         2525        
  811
assigning blob                 15      1361573         7523         2525        
  811
inserting blob                 16      1361573         7523         2525        
 1187
assigning blob                 16      1361576          815         2525        
 1187
inserting blob                 17      1361576          815         2525        
  950
inserting blob                 18      1361576          815         2525        
  951
inserting blob                 19      1361576          815         2525        
  952
assigning blob                 19      1361578         2746         2525        
  952
inserting blob                 20      1361578         2746         2525        
 1012
assigning blob                 20      1361581         3773         2525        
 1012
inserting blob                 21      1361581         3773         2525        
 1078
assigning blob                 21      1361582         7079         2525        
 1078
inserting blob                 22      1361582         7079         2525        
  644
assigning blob                 22      1361583         8144         2525        
  644
inserting blob                 23      1361583         8144         2525        
  883
inserting blob                 24      1361583         8144         2525        
  884
inserting blob                 25      1361583         8144         2525        
  885
assigning blob                 25      1361585         8162         2525        
  885
inserting blob                 26      1361585         8162         2525        
  892
inserting blob                 27      1361585         8162         2525        
  893
inserting blob                 28      1361585         8162         2525        
 1575
assigning blob                 28      1361586         1331         2525        
 1575
inserting blob                 29      1361586         1331         2525        
  257
assigning blob                 29      1361587          548         2525        
  257
inserting blob                 30      1361587          548         2525        
  215
inserting blob                 31      1361587          548         2525        
  216
assigning blob                 31      1361588         8127         2525        
  216
inserting blob                 32      1361588         8127         2525        
  946
inserting blob                 33      1361588         8127         2525        
  947
assigning blob                 33      1361589         2798         2525        
  947
inserting blob                 34      1361589         2798         2525        
 1024
assigning blob                 34      1361590         3776         2525        
 1024
inserting blob                 35      1361590         3776         2525        
 1079
assigning blob                 35      1361591         7031         2525        
 1079
inserting blob                 36      1361591         7031         2525        
  634
assigning blob                 36      1361592         1948         2525        
  634
inserting blob                 37      1361592         1948         2525        
  358
inserting blob                 38      1361592         1948         2525        
  359
inserting blob                 39      1361592         1948         2525        
  360
assigning blob                 39      1361593         8141         2525        
  360
inserting blob                 40      1361593         8141         2525        
  861
inserting blob                 41      1361593         8141         2525        
  862
inserting blob                 42      1361593         8141         2525        
  863
assigning blob                 42      1361594         7424         2524        
  863
inserting blob                 43      1361594         7424         2524        
 1393
assigning blob                 43      1361595         4311         2524        
 1393
inserting blob                 44      1361595         4311         2524        
 1108
inserting blob                 45      1361595         4311         2524        
 1446
assigning blob                 45      1361595         4311         2525        
 1446
inserting blob                 46      1361595         4311         2525        
 1108
inserting blob                 47      1361595         4311         2525        
 1446
assigning blob                 47      1361596         7915         2525        
 1446
inserting blob                 48      1361596         7915         2525        
  806
assigning blob                 48      1361599         7588         2525        
  806
inserting blob                 49      1361599         7588         2525        
  749
assigning blob                 49      1361600         2806         2524        
  749
inserting blob                 50      1361600         2806         2524        
 1029
inserting blob                 51      1361600         2806         2524        
 1482
Statement failed, SQLSTATE = 42000
invalid BLOB ID
-At procedure 'DO_CHANGETXSTATUS' line: 31, col: 21


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

        

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to