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

Method create_database

src/utilities/nbackup/nbackup.cpp:570–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

568}
569
570void NBackup::create_database()
571{
572#ifdef WIN_NT
573 dbase = CreateFile(dbname.c_str(), GENERIC_READ | GENERIC_WRITE, FILE_SHARE_DELETE,
574 NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
575 if (dbase != INVALID_HANDLE_VALUE)
576 return;
577#else
578 dbase = os_utils::open(dbname.c_str(), O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE, 0660);
579 if (dbase >= 0)
580 return;
581#endif
582
583 status_exception::raise(Arg::Gds(isc_nbackup_err_createdb) << dbname.c_str() << Arg::OsError());
584}
585
586void NBackup::close_database()
587{

Callers

nothing calls this directly

Calls 5

raiseFunction · 0.85
GdsClass · 0.85
OsErrorClass · 0.85
openFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected