New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forced database shutdown does not work if non-zero delay was specified [CORE3817] #4159
Comments
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Commented by: @dyemanov Additional comments: In summary, shutdown -force does not shut down existing connections. It does put the database into a shutdown mode. However, in multi mode, privileged users cannot log in until the "trapped" user sessions are terminated. (There's another bug apparent here, I think, in that a user created with global admin privileges - WOMBAT - can't put the database online.) DEMO Firebird 2.5.1 Superclassic running on a netbook under WinXP XP3 gsec display: cs1:c:\Programs\Firebird\Firebird_2_5\bin>gstat -h empdb Database "c:\programs\firebird\firebird_2_5\examples\empbuild\employee.fdb"
c:\Programs\Firebird\Firebird_2_5\bin> cs2:c:\Programs\Firebird\Firebird_2_5\bin>isql empdb -user nobody -password badsushi Database: empdb, User: nobody SQL> cs3:c:\Programs\Firebird\Firebird_2_5\bin>isql -user wombat -password badsushi cs1:c:\Programs\Firebird\Firebird_2_5\bin>gfix -shut multi -force 5 empdb -user sysd c:\Programs\Firebird\Firebird_2_5\bin>gstat -h empdb Database "c:\programs\firebird\firebird_2_5\examples\empbuild\employee.fdb"
c:\Programs\Firebird\Firebird_2_5\bin> cs2: (after shutdown):SQL> select * from country; -- (non-privileged user NOBODY) COUNTRY CURRENCY SQL> cs3:SQL> connect empdb -- (privileged user WOMBAT) cs2:SQL> commit; c:\Programs\Firebird\Firebird_2_5\bin> cs3:SQL> connect empdb; -- (privileged user WOMBAT) SQL> connect empdb user 'wombat' password 'badsushi'; SQL> cs1:c:\Programs\Firebird\Firebird_2_5\bin>gfix -online empdb -user wombat -password c:\Programs\Firebird\Firebird_2_5\bin>gfix -online empdb -user sysdba -password c:\Programs\Firebird\Firebird_2_5\bin> |
Commented by: @dyemanov Confirmation by Helen: I confirm similar (although not exactly the same) behaviour w. v.2.0.7 and 2.1.5. Don't have a v.1.5 Windows box available. The difference: with 2.0.7 and 2.1.5 the message to client when connection is refused is "Statement failed, SQLCODE -903 database {file-path} shutdown With 2.5.1 it is nasty "Statement failed, SQLSTATE = 08006 |
Modified by: @dyemanovstatus: Open [ 1 ] => In Progress [ 3 ] |
Modified by: @dyemanovstatus: In Progress [ 3 ] => Open [ 1 ] |
Modified by: @dyemanovstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Alpha 1 [ 10331 ] Fix Version: 2.5.3 [ 10461 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] QA Status: No test => Deferred Test Details: QA status was changed for moving this ticket to smaller group. Test can be implemented using Python. |
Submitted by: @dyemanov
There are two visible issues:
1) Any kind of shutdown attempt does not shut the active connections down
2) While they're connected nobody else (including SYSDBA) can connect even if the multi-user shutdown was requested
Everything works as expected with zero timeout interval (-force 0).
Commits: 47c71f3
====== Test Details ======
QA status was changed for moving this ticket to smaller group. Test can be implemented using Python.
The text was updated successfully, but these errors were encountered: