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

Function act_transaction

src/gpre/sql.cpp:4465–4500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4463//
4464
4465static act* act_transaction(act_t type)
4466{
4467 const TEXT* transaction = NULL;
4468
4469 par_options(&transaction);
4470 MSC_match(KW_WORK);
4471
4472 act* action = (act*) MSC_alloc(ACT_LEN);
4473 action->act_type = type;
4474 action->act_whenever = gen_whenever();
4475 action->act_object = (ref*) transaction;
4476
4477 if (MSC_match(KW_RELEASE))
4478 {
4479 type = (type == ACT_commit) ? ACT_finish : ACT_rfinish;
4480 if (transaction)
4481 {
4482 action->act_rest = (act*) MSC_alloc(ACT_LEN);
4483 action->act_rest->act_type = type;
4484 }
4485 else
4486 action->act_type = type;
4487 }
4488 else if ((type == ACT_commit) && (MSC_match(KW_RETAIN)))
4489 {
4490 MSC_match(KW_SNAPSHOT);
4491 action->act_type = type = ACT_commit_retain_context;
4492 }
4493 else if ((type == ACT_rollback) && (MSC_match(KW_RETAIN)))
4494 {
4495 MSC_match(KW_SNAPSHOT);
4496 action->act_type = type = ACT_rollback_retain_context;
4497 }
4498
4499 return action;
4500}
4501
4502
4503//____________________________________________________________

Callers 1

SQL_actionFunction · 0.85

Calls 4

MSC_matchFunction · 0.85
MSC_allocFunction · 0.85
par_optionsFunction · 0.70
gen_wheneverFunction · 0.70

Tested by

no test coverage detected