Icon View Incident Report

Serious Serious
Reported By: Terry Swiers
Reported On: 10/29/2020
For: Version 2.33 Build 1
# 4787 Enabling SQL Statement Caching Can Cause AV During Session Shutdown with Cross-Database Queries

In EDB 2.33b1, closing a TEDBSession throws an AV if SQLStmtCacheSize > 0 and there are cached statements present.

Temporary workaround is to call FreeCachedSQLStmts('') before closing the session.

I have NOT had a chance to verify if the same problem exists with FuncProcCacheSize.

procedure TForm1.Button2Click(Sender: TObject);

   function WordGeneratorExists(ModuleName: String): Boolean;
   var
      Q : TEDBQuery;
   begin
      Q := TEDBQuery.Create(nil);
      Q.SessionName := EDBSession1.SessionName;
      Q.DatabaseName := EDBDatabase1.DatabaseName;
      Q.DisableControls;
      Q.SQL.Text := 'select * from configuration.wordgenerators where name = :ModuleName';
      Q.ParamByName('ModuleName').AsString := ModuleName;
      Result := False;
   try
      Q.Open;
      Result := Q.RecordCount > 0;
      Q.Close;
   except
   end;
      Q.Free;
   end;

begin
   EDBSession1.Execute( Format('DROP DATABASE "%s"', ['MemDB']) );
   EDBSession1.Execute( Format('CREATE DATABASE "%s" IN MEMORY', ['MemDB']) );
   EDBSession1.Open;
   if WordGeneratorExists('SomeName') then Caption := '';
   EDBSession1.Close;
end;



Comments Comments
The issue was with cross-database queries and the shutdown of sessions with non-closed SQL statements/queries.


Resolution Resolution
Fixed Problem on 10/30/2020 in version 2.33 build 2


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 LCL Standard with Source
ElevateDB PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image