ZDbcInterbase6Statement in line 373, mybe bug
Posted: 26.02.2021, 13:24
PrepareFinalChunk(ArrayCount mod FMaxRowsPerBatch);
when ArrayCount mod FMaxRowsPerBatch = 0, av occure
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 cause av when ArrayCount mod FMaxRowsPerBatch = 0
end else if (FBatchStmts[False].PreparedRowsOfArray <> ArrayCount) then
PrepareArrayStmt(FBatchStmts[False]); //full block of batch
end;