~ubuntu-branches/ubuntu/oneiric/firebird2.1/oneiric

« back to all changes in this revision

Viewing changes to src/jrd/shut.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2011-04-22 18:59:44 UTC
  • mfrom: (2.1.24 sid)
  • Revision ID: james.westby@ubuntu.com-20110422185944-egwy9r5xynjddku5
Tags: 2.1.4.18393-0.ds2-2
* apply patch from upstream SVN fixing ICU collations
* remove lintian overrides about manpages shipped in dependency package
* claim compliancy with Policy 3.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
        const SSHORT flag = data.data_items.flag;
83
83
        const SSHORT delay = data.data_items.delay;
84
84
 
 
85
        const int shut_mode = flag & isc_dpb_shut_mode_mask;
 
86
 
85
87
/* Database shutdown has been cancelled. */
86
88
 
87
89
        // Delay of -1 means we're going online
88
 
        if (delay == -1) {
 
90
        if (delay == -1)
 
91
        {
89
92
                dbb->dbb_ast_flags &=
90
 
                        ~(DBB_shut_attach | DBB_shut_tran | DBB_shut_force |
91
 
                          DBB_shutdown | DBB_shutdown_single | DBB_shutdown_full);
92
 
                switch (flag & isc_dpb_shut_mode_mask) {
93
 
                case isc_dpb_shut_normal:
94
 
                        break;
95
 
                case isc_dpb_shut_multi:
96
 
                        dbb->dbb_ast_flags |= DBB_shutdown;
97
 
                        break;
98
 
                case isc_dpb_shut_single:
99
 
                        dbb->dbb_ast_flags |= DBB_shutdown | DBB_shutdown_single;
100
 
                        break;
101
 
                case isc_dpb_shut_full:
102
 
                        dbb->dbb_ast_flags |= DBB_shutdown | DBB_shutdown_full;
103
 
                        break;
104
 
                default:
105
 
                        fb_assert(false);
 
93
                        ~(DBB_shut_attach | DBB_shut_tran | DBB_shut_force);
 
94
 
 
95
                if (shut_mode)
 
96
                {
 
97
                        dbb->dbb_ast_flags &=
 
98
                                ~(DBB_shutdown | DBB_shutdown_single | DBB_shutdown_full);
 
99
 
 
100
                        switch (shut_mode) {
 
101
                        case isc_dpb_shut_normal:
 
102
                                break;
 
103
                        case isc_dpb_shut_multi:
 
104
                                dbb->dbb_ast_flags |= DBB_shutdown;
 
105
                                break;
 
106
                        case isc_dpb_shut_single:
 
107
                                dbb->dbb_ast_flags |= DBB_shutdown | DBB_shutdown_single;
 
108
                                break;
 
109
                        case isc_dpb_shut_full:
 
110
                                dbb->dbb_ast_flags |= DBB_shutdown | DBB_shutdown_full;
 
111
                                break;
 
112
                        default:
 
113
                                fb_assert(false);
 
114
                        }
106
115
                }
107
 
                                        
 
116
 
108
117
                dbb->dbb_shutdown_delay = 0; // not tested anywhere
109
118
                /* CVC: We never set it, so how could we need to unset ATT_shutdown_modify?
110
119
                for (Attachment* attachment = dbb->dbb_attachments; attachment;
234
243
                                           flag & (isc_dpb_shut_attachment |
235
244
                                                           isc_dpb_shut_transaction)))
236
245
        {
237
 
                notify_shutdown(dbb, 0, 0);     /* Tell everyone we're giving up */
 
246
                notify_shutdown(dbb, 0, -1);    /* Tell everyone we're giving up */
238
247
                SHUT_blocking_ast(dbb);
239
248
                attachment->att_flags &= ~ATT_shutdown_manager;
240
249
                ++dbb->dbb_use_count;