Skip to content

DROP DATABASE lead FB to hang if it is issued while DB encrypting/decrypting is in progress #7200

@pavel-zotov

Description

@pavel-zotov

In test environment temporary databases are created and dropped for every new test. But 'drop database' can lead FB to hang if we do that just after 'alter database encrypt | decrypt' without any pause.
It will be good to receive error like 'object in use' instead.

Steps to reproduce using built-in FB 4.x encryption plugin:

  1. change dir to your FB 4.x home
  2. run there:
copy .\examples\prebuilt\plugins\fbSampleDbCrypt.* .\plugins\*.*
  1. open in editor file .\plugins\fbSampleDbCrypt.conf and add there following line:
Auto = yes
  1. run following .sql:
set echo on;
set list on;
set bail on;
shell if exist c:\temp\tmp4test.fdb del c:\temp\tmp4test.fdb;
create database 'inet://c:\temp\tmp4test.fdb' user sysdba password 'masterkey';
 
alter database encrypt with "fbSampleDbCrypt" key "Red";
-- commit;
drop database;
quit;

Output will show "drop database" and will hang infinitely since that.
Expected: message that DB can not be dropped (somewhat like "object in use").

Here is URL to dump, stack trace and official 4.0.1 Release (4.0.1.2692):

https://drive.google.com/drive/folders/1hi4R5gdjUL5MW67_0ET3hWMD3pZuTp6C?usp=sharing

PS.

  1. same if we try to DEcrypt database
  2. removing comment from "-- commit;" does not help. One need to stay in pause for 1..2 seconds in order DROP DATABASE can be performed normally.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions