82
82
const SSHORT flag = data.data_items.flag;
83
83
const SSHORT delay = data.data_items.delay;
85
const int shut_mode = flag & isc_dpb_shut_mode_mask;
85
87
/* Database shutdown has been cancelled. */
87
89
// Delay of -1 means we're going online
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:
95
case isc_dpb_shut_multi:
96
dbb->dbb_ast_flags |= DBB_shutdown;
98
case isc_dpb_shut_single:
99
dbb->dbb_ast_flags |= DBB_shutdown | DBB_shutdown_single;
101
case isc_dpb_shut_full:
102
dbb->dbb_ast_flags |= DBB_shutdown | DBB_shutdown_full;
93
~(DBB_shut_attach | DBB_shut_tran | DBB_shut_force);
98
~(DBB_shutdown | DBB_shutdown_single | DBB_shutdown_full);
101
case isc_dpb_shut_normal:
103
case isc_dpb_shut_multi:
104
dbb->dbb_ast_flags |= DBB_shutdown;
106
case isc_dpb_shut_single:
107
dbb->dbb_ast_flags |= DBB_shutdown | DBB_shutdown_single;
109
case isc_dpb_shut_full:
110
dbb->dbb_ast_flags |= DBB_shutdown | DBB_shutdown_full;
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)))
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;