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

Function MVOL_init_write

src/burp/mvol.cpp:768–792  ·  view source on GitHub ↗

____________________________________________________________ Write init record to the backup file

Source from the content-addressed store, hash-verified

766// Write init record to the backup file
767//
768void MVOL_init_write(const char* file_name)
769{
770 BurpGlobals* tdgbl = BurpGlobals::getSpecific();
771
772 mvol_init_write(tdgbl, file_name, &tdgbl->blk_io_cnt, &tdgbl->blk_io_ptr);
773
774 tdgbl->gbl_io_cnt = ZC_BUFSIZE;
775 tdgbl->gbl_io_ptr = tdgbl->gbl_compress_buffer;
776
777#ifdef HAVE_ZLIB_H
778 if (tdgbl->gbl_sw_zip)
779 {
780 z_stream& strm = tdgbl->gbl_stream;
781
782 strm.zalloc = Firebird::ZLib::allocFunc;
783 strm.zfree = Firebird::ZLib::freeFunc;
784 strm.opaque = Z_NULL;
785 checkCompression();
786 int ret = zlib().deflateInit(&strm, Z_DEFAULT_COMPRESSION);
787 if (ret != Z_OK)
788 BURP_error(384, true, SafeArg() << ret);
789 strm.next_out = Z_NULL;
790 }
791#endif
792}
793
794void mvol_init_write(BurpGlobals* tdgbl, const char* file_name, int* cnt, UCHAR** ptr)
795{

Callers

nothing calls this directly

Calls 4

mvol_init_writeFunction · 0.85
checkCompressionFunction · 0.85
BURP_errorFunction · 0.85
SafeArgClass · 0.50

Tested by

no test coverage detected