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

Method setSequence

src/jrd/replication/Applier.cpp:918–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

916}
917
918void Applier::setSequence(thread_db* tdbb, const MetaName& genName, SINT64 value)
919{
920 const auto attachment = tdbb->getAttachment();
921
922 auto gen_id = attachment->att_generators.lookup(genName);
923
924 if (gen_id < 0)
925 {
926 gen_id = MET_lookup_generator(tdbb, genName);
927
928 if (gen_id < 0)
929 raiseError("Generator %s is not found", genName.c_str());
930
931 attachment->att_generators.store(gen_id, genName);
932 }
933
934 AutoSetRestoreFlag<ULONG> noCascade(&tdbb->tdbb_flags, TDBB_repl_in_progress, !m_enableCascade);
935
936 if (DPM_gen_id(tdbb, gen_id, false, 0) < value)
937 DPM_gen_id(tdbb, gen_id, true, value);
938}
939
940void Applier::storeBlob(thread_db* tdbb, TraNumber traNum, bid* blobId,
941 ULONG length, const UCHAR* data)

Callers 1

REPL_gen_idFunction · 0.45

Calls 5

raiseErrorFunction · 0.70
getAttachmentMethod · 0.45
lookupMethod · 0.45
c_strMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected