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

Function create_database_modify_dyn

src/gpre/cmd.cpp:1412–1449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1410//
1411
1412static void create_database_modify_dyn( gpre_req* request, act* action)
1413{
1414 gpre_dbb* db = ((mdbb*) action->act_object)->mdbb_database;
1415
1416 request->add_byte(isc_dyn_mod_database);
1417
1418 // Reverse the order of files (parser left them backwards)
1419
1420 gpre_file* next;
1421 gpre_file* files = NULL;
1422 for (gpre_file* file = db->dbb_files; file; file = next)
1423 {
1424 next = file->fil_next;
1425 file->fil_next = files;
1426 files = file;
1427 }
1428
1429 SLONG start = db->dbb_length;
1430
1431 for (const gpre_file* file = files; file != NULL; file = file->fil_next)
1432 {
1433 put_cstring(request, isc_dyn_def_file, file->fil_name);
1434 request->add_byte(isc_dyn_file_start);
1435 request->add_word(4);
1436 start = MAX(start, file->fil_start);
1437 request->add_long(start);
1438 request->add_byte(isc_dyn_file_length);
1439 request->add_word(4);
1440 request->add_long(file->fil_length);
1441 request->add_end();
1442 start += file->fil_length;
1443 }
1444
1445 if (db->dbb_def_charset)
1446 put_cstring(request, isc_dyn_fld_character_set_name, db->dbb_def_charset);
1447
1448 request->add_end();
1449}
1450
1451
1452//____________________________________________________________

Callers 1

CMD_compile_ddlFunction · 0.85

Calls 5

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

Tested by

no test coverage detected