Attempted to fix CORE-4388: SELECT WITH LOCK may enter an infinite loop for a single record. To be field tested.

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/trunk@59435 65644016-39b1-43b1-bf79-96bc8fe82c15
Misc.

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/trunk@59437 65644016-39b1-43b1-bf79-96bc8fe82c15
nightly update

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/trunk@59439 65644016-39b1-43b1-bf79-96bc8fe82c15
1) Prevent shutdown/cancellation for system attachments.
2) Fixed incorrect generation of attachment IDs causing a hangup during gfix -mode read_only.

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/trunk@59440 65644016-39b1-43b1-bf79-96bc8fe82c15
Correction.

git-svn-id: svn+ssh://svn.code.sf.net/p/firebird/code/firebird/trunk@59441 65644016-39b1-43b1-bf79-96bc8fe82c15