Issue Details (XML | Word | Printable)

Key: CORE-6266
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Dmitry Yemanov
Reporter: Andrey Kravchenko
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Deleting records from MON$ATTACHMENTS using ORDER BY clause doesn't close the corresponding attachments

Created: 19/Mar/20 09:57 AM   Updated: 20/Apr/20 10:36 AM
Component/s: Engine
Affects Version/s: 4.0 Beta 1, 2.5.9, 3.0.5
Fix Version/s: 4.0 Beta 2, 3.0.6

QA Status: Done with caveats
Test Details:
Section for 4.0 (in .fbt file) intentionally contains temp message about missed implementation. Will be removed after fix for 4.0.


 Description  « Hide
Start the server.

In 1st terminal - create new database and type:
SQL> commit; select mon$attachment_id, mon$user, mon$timestamp from mon$attachments order by mon$timestamp;
Output will be 3 attachments in order: SYSDBA, Cache Writer, Garbage Collector

After connect from 2nd terminal and type in 1st terminal:
SQL> commit; select mon$attachment_id, mon$user, mon$timestamp from mon$attachments order by mon$timestamp;
Output will be 4 attachments in order:
3 SYSDBA
1 Cache Writer
2 Garbage Collector
4 SYSDBA

After type:
SQL> commit; delete from mon$attachments order by mon$timestamp;
Output no errors, but if typing:
SQL> commit; select mon$attachment_id, mon$user, mon$timestamp from mon$attachments order by mon$timestamp;
Output will be same 4 attachments, but one attachment should be closed (in the 2nd terminal).

If set breakpoint in function VirtualTable::erase (src/jrd/VirtualTable.cpp) id from all 4 times is same (the first one in the select and equal of current attachment in 1st terminal)

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 19/Mar/20 01:15 PM - edited
Fix is committed into the v3 branch, please verify.

Andrey Kravchenko added a comment - 19/Mar/20 03:28 PM - edited
Now the attachments is closing. Thanks