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

Function check_repl_state

src/jrd/vio.cpp:4877–4908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4875
4876
4877static void check_repl_state(thread_db* tdbb,
4878 jrd_tra* transaction,
4879 record_param* org_rpb,
4880 record_param* new_rpb,
4881 USHORT id)
4882{
4883/**************************************
4884 *
4885 * c h e c k _ r e p l _ s t a t e
4886 *
4887 **************************************
4888 *
4889 * Functional description
4890 * A record in a system relation containing a replication state is
4891 * being changed. Check to see if the replication state has changed,
4892 * and if so, post the change.
4893 *
4894 **************************************/
4895 SET_TDBB(tdbb);
4896
4897 dsc desc1, desc2;
4898 const bool flag_org = EVL_field(0, org_rpb->rpb_record, id, &desc1);
4899 const bool flag_new = EVL_field(0, new_rpb->rpb_record, id, &desc2);
4900
4901 if (!flag_org && !flag_new)
4902 return;
4903
4904 if (flag_org && flag_new && !MOV_compare(tdbb, &desc1, &desc2))
4905 return;
4906
4907 DFW_post_work(transaction, dfw_change_repl_state, "", 0);
4908}
4909
4910
4911static void delete_record(thread_db* tdbb, record_param* rpb, ULONG prior_page, MemoryPool* pool)

Callers 1

VIO_modifyFunction · 0.85

Calls 3

SET_TDBBFunction · 0.85
EVL_fieldFunction · 0.85
MOV_compareFunction · 0.85

Tested by

no test coverage detected