mabe a bug in ZDbcInterbase6Statement in line 373

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
xwg
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 26.02.2021, 13:13

mabe a bug in ZDbcInterbase6Statement in line 373

Post by xwg »

when ArrayCount mod FMaxRowsPerBatch = 0, av occure.

Code: Select all

if ArrayCount > 0 then begin
    if FMaxRowsPerBatch = 0 then begin
      eBlock := GetExecuteBlockString(FParamSQLData,
        IsParamIndex, InParamCount, ArrayCount, CachedQueryRaw,
        FIBConnection.GetPlainDriver, FMemPerRow, PreparedRowsOfArray, FMaxRowsPerBatch,
          FTypeTokens, FStatementType, FIBConnection.GetXSQLDAMaxSize);
    end else
       eBlock := '';
    if (FMaxRowsPerBatch <= ArrayCount) and (eBlock <> '') then begin
      PrepareArrayStmt(FBatchStmts[True]); //max block size per batch
      if ArrayCount > FMaxRowsPerBatch then //final block count
      PrepareFinalChunk(ArrayCount mod PreparedRowsOfArray);
    end else if (eBlock = '') then begin
      if (FMaxRowsPerBatch > ArrayCount) then begin
        if (FBatchStmts[False].PreparedRowsOfArray <> ArrayCount) then
          PrepareFinalChunk(ArrayCount) //full block of batch
      end else
        if (ArrayCount <> FMaxRowsPerBatch) and (FBatchStmts[False].PreparedRowsOfArray <> (ArrayCount mod FMaxRowsPerBatch)) then
          PrepareFinalChunk(ArrayCount mod FMaxRowsPerBatch); //final block of batch  <==== this line av when  ArrayCount mod FMaxRowsPerBatch = 0
    end else if (FBatchStmts[False].PreparedRowsOfArray <> ArrayCount) then
      PrepareArrayStmt(FBatchStmts[False]); //full block of batch
    end;
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1935
Joined: 17.01.2011, 14:17

Re: mabe a bug in ZDbcInterbase6Statement in line 373

Post by marsupilami »

Hello,

thank you for the patch. We applied it to trunk. It will take some time before it gets merged into the stable branches.

Best regards,

Jan
Post Reply