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

Function create_shadow

src/gpre/cmd.cpp:1566–1598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1564//
1565
1566static void create_shadow( gpre_req* request, act* action)
1567{
1568 gpre_file* files = (gpre_file*) action->act_object;
1569 gpre_file* file;
1570
1571 // Reverse the order of files (parser left them backwards)
1572 gpre_file* next;
1573 for (file = files, files = NULL; file; file = next)
1574 {
1575 next = file->fil_next;
1576 file->fil_next = files;
1577 files = file;
1578 }
1579 put_numeric(request, isc_dyn_def_shadow, (SSHORT) files->fil_shadow_number);
1580
1581 for (file = files; file != NULL; file = file->fil_next)
1582 {
1583 put_cstring(request, isc_dyn_def_file, file->fil_name);
1584 request->add_byte(isc_dyn_file_start);
1585 request->add_word(4);
1586 const SLONG start = file->fil_start;
1587 request->add_long(start);
1588 request->add_byte(isc_dyn_file_length);
1589 request->add_word(4);
1590 request->add_long(file->fil_length);
1591 if (file->fil_flags & FIL_manual)
1592 put_numeric(request, isc_dyn_shadow_man_auto, 1);
1593 if (file->fil_flags & FIL_conditional)
1594 put_numeric(request, isc_dyn_shadow_conditional, 1);
1595 request->add_end();
1596 }
1597 request->add_end();
1598}
1599
1600
1601//____________________________________________________________

Callers 1

CMD_compile_ddlFunction · 0.85

Calls 6

put_cstringFunction · 0.85
add_endMethod · 0.80
put_numericFunction · 0.70
add_byteMethod · 0.45
add_wordMethod · 0.45
add_longMethod · 0.45

Tested by

no test coverage detected