Icon View Incident Report

Serious Serious
Reported By: Bernd Kuhlmann
Reported On: 2/7/2006
For: Version 4.22 Build 4
# 2157 Heavy Updating of Table with BLOB Fields Can Cause #10030 "Invalid BLOB Handle" Error

One of our customers is getting dbisam engine error #10242 and #10030. I have created a small example which raises the #10030. Maybe the #10242 is a result of the 10030. To reproduce the error you have to create three instances of the programm and run them concurrently. If only one instance is running no error is raised.

procedure TForm1.InsertRandom;
var sl: TStringList;
    i: Integer;
    stream: TStream;
    size: Integer;
    s: String;
begin
  sl:=TStringList.Create;
  Randomize;
  tbVorgang.Open;
  tbVorgang.Insert;
  size:=Random(10000);
  // write the blobfield
  stream:=tbVorgang.CreateBlobStream(tbVorgang.fieldByName('vBlob'),bmwrite);
  stream.Write(buffer,size);
  stream.Free;
  sl.add('Angebot '+IntToStr(Random(10000)));
  // write a memofield with full text index
  tbVorgang.fieldByName('txt_oben').assign(sl);
  tbVorgang.post;
  tbVorgang.Close;
  sl.Free;
end;

procedure TForm1.EditRandom;
var sl: TStringList;
    i: Integer;
    stream: TStream;
    buffer: array[1..10000] of char;
    size: Integer;
    s: String;
begin
  sl:=TStringList.Create;
  Randomize;
  tbVorgang.Open;
  tbVorgang.Last;
  tbVorgang.MoveBy(-Random(100));
  tbVorgang.Edit;
  // Read and write the blobfield
  stream:=tbVorgang.CreateBlobStream(tbVorgang.fieldByName('vBlob'),bmread);
  size:=stream.Read(buffer,10000);
  stream.Free;
  stream:=tbVorgang.CreateBlobStream(tbVorgang.fieldByName('vBlob'),bmwrite);
  stream.Write(buffer,size);
  stream.Free;
  s:='';
  for i:=1 to random(100)+50 do
  begin
    s:=s+buffer[i];
  end;
  // write a memofield with full text index
  sl.assign(tbVorgang.fieldByName('txt_oben'));
  sl.add(s);
  tbVorgang.fieldByName('txt_oben').assign(sl);
  tbVorgang.post;
  tbVorgang.Close;
  sl.Free;
end;

procedure TForm1.DoTest;
begin
  InsertRandom;
  EditRandom;
end;

procedure TForm1.bStartClick(Sender: TObject);
var i: Integer;
begin
  for i:=1 to StrToInt(edit1.text) do
  begin
    DoTest;
    caption:=IntToStr(i);
  end;
end;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  for i:=1 to 10000 do
  begin
    buffer[i]:=chr(Random(40)+65);
    if random(100)>90 then buffer[i]:=' ';
  end;
end;



Comments Comments
This problem was initially reported as fixed in 4.22 B5, however it only fixed the problem for local access. Remote access via the database server still experienced the same problem. B6 corrects both local and remote issues.


Resolution Resolution
Fixed Problem on 2/17/2006 in version 4.22 build 6


Products Affected Products Affected
DBISAM Additional Software and Utilities
DBISAM CLX Client-Server
DBISAM CLX Client-Server with Source
DBISAM CLX Standard
DBISAM CLX Standard with Source
DBISAM ODBC Client-Server
DBISAM ODBC Client-Server with Source
DBISAM ODBC Standard
DBISAM ODBC Standard with Source
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source

Image