MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / buildDpb

Function buildDpb

src/alice/exe.cpp:208–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206//
207
208static void buildDpb(Firebird::ClumpletWriter& dpb, const SINT64 switches)
209{
210 AliceGlobals* tdgbl = AliceGlobals::getSpecific();
211 dpb.reset(isc_dpb_version1);
212 dpb.insertTag(isc_dpb_gfix_attach);
213 tdgbl->uSvc->fillDpb(dpb);
214
215 if (switches & sw_sweep) {
216 dpb.insertByte(isc_dpb_sweep, isc_dpb_records);
217 }
218 else if (switches & sw_activate) {
219 dpb.insertTag(isc_dpb_activate_shadow);
220 }
221 else if (switches & sw_validate)
222 {
223 UCHAR b = isc_dpb_pages;
224 if (switches & sw_full)
225 b |= isc_dpb_records;
226 if (switches & sw_no_update)
227 b |= isc_dpb_no_update;
228 if (switches & sw_mend)
229 b |= isc_dpb_repair;
230 if (switches & sw_ignore)
231 b |= isc_dpb_ignore;
232 dpb.insertByte(isc_dpb_verify, b);
233 }
234 else if (switches & sw_housekeeping) {
235 dpb.insertInt(isc_dpb_sweep_interval, tdgbl->ALICE_data.ua_sweep_interval);
236 }
237/*
238 else if (switches & sw_begin_log)
239 {
240 dpb.insertString(isc_dpb_begin_log,
241 tdgbl->ALICE_data.ua_log_file,
242 strlen(tdgbl->ALICE_data.ua_log_file));
243 }
244 else if (switches & sw_quit_log) {
245 dpb.insertTag(isc_dpb_quit_log);
246 }
247*/
248 else if (switches & sw_buffers) {
249 dpb.insertInt(isc_dpb_set_page_buffers, tdgbl->ALICE_data.ua_page_buffers);
250 }
251 else if (switches & sw_kill) {
252 dpb.insertTag(isc_dpb_delete_shadow);
253 }
254 else if (switches & sw_write) {
255 dpb.insertByte(isc_dpb_force_write, tdgbl->ALICE_data.ua_force ? 1 : 0);
256 }
257 else if (switches & sw_no_reserve) {
258 dpb.insertByte(isc_dpb_no_reserve, tdgbl->ALICE_data.ua_no_reserve ? 1 : 0);
259 }
260 else if (switches & sw_mode) {
261 dpb.insertByte(isc_dpb_set_db_readonly, tdgbl->ALICE_data.ua_read_only ? 1 : 0);
262 }
263 else if (switches & sw_shut)
264 {
265 UCHAR b = 0;

Callers 2

EXE_actionFunction · 0.85
EXE_two_phaseFunction · 0.85

Calls 11

fb_strlenFunction · 0.85
insertByteMethod · 0.80
resetMethod · 0.45
insertTagMethod · 0.45
fillDpbMethod · 0.45
insertIntMethod · 0.45
getAuthBlockMethod · 0.45
insertBytesMethod · 0.45
insertStringMethod · 0.45
isServiceMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected