Icon View Incident Report

Serious Serious
Reported By: Heiko Knuttel
Reported On: 6/26/2008
For: Version 2.00 Build 2
# 2688 Using Specific DatabaseName in UPDATE or DELETE Statement Can Cause Subsequent Catalog Read Error

I have 2 databases, one physical named "database", one in-memory named "memory". When I execute the following code
the applications hangs. In EDBManager, after a while I get an:

ElevateDB Error #300 Cannot lock the catalog memory for write access

procedure TForm1.Button1Click(Sender: TObject);
begin
   engine.ConfigPath := extractfilepath(application.ExeName);
   session.LoginUser := 'Administrator';
   session.LoginPassword := 'EDBDefault';

   try sql('drop database "database"', 'Configuration'); except end;
   try sql('drop database "memory"', 'Configuration'); except end;
   sql('create database "database" path '+quotedstr(extractfilepath(application.ExeName)), 'Configuration');
   sql('create database "memory" in memory', 'Configuration');
   sql('create table test (field1 integer, field2 integer, field3 integer)', 'database');
   sql('insert into test (field1, field2, field3) values (1,2,3)', 'database');
   sql('create table test as select * from database.test with data', 'memory');
   sql('update memory.test set field1=2', 'database');
   sql('insert into test select * from memory.test', 'database');
   sql('drop table test', 'memory');
end;

procedure TForm1.sql(stmt, db: String);
begin
   with query do begin
      DatabaseName := db;
      SQL.Text := stmt;
      memo1.Lines.Add(db+': '+stmt+#13#10);
      ExecSQL;
   end;
end;



Comments Comments
The UPDATE was acquiring a catalog read lock during compilation and not releasing it, thus causing the DROP to fail with the error. This was also a problem with the DELETE statement, but not the SELECT or INSERT statement.


Resolution Resolution
Fixed Problem on 6/28/2008 in version 2.01 build 1


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image