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

Function protect_system_table_insert

src/jrd/vio.cpp:6421–6448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6419
6420
6421static void protect_system_table_insert(thread_db* tdbb,
6422 const Request* request,
6423 const jrd_rel* relation,
6424 bool force_flag)
6425{
6426/**************************************
6427 *
6428 * p r o t e c t _ s y s t e m _ t a b l e _ i n s e r t
6429 *
6430 **************************************
6431 *
6432 * Functional description
6433 * Disallow insertions on system tables for everyone except
6434 * the GBAK restore process and internal (system) requests used
6435 * by the engine itself.
6436 *
6437 **************************************/
6438 const Attachment* const attachment = tdbb->getAttachment();
6439
6440 if (!force_flag)
6441 {
6442 if (attachment->isGbak() || request->hasInternalStatement())
6443 return;
6444 }
6445
6446 status_exception::raise(Arg::Gds(isc_protect_sys_tab) <<
6447 Arg::Str("INSERT") << Arg::Str(relation->rel_name));
6448}
6449
6450
6451static void protect_system_table_delupd(thread_db* tdbb,

Callers 1

VIO_storeFunction · 0.85

Calls 6

raiseFunction · 0.85
GdsClass · 0.85
StrClass · 0.85
hasInternalStatementMethod · 0.80
getAttachmentMethod · 0.45
isGbakMethod · 0.45

Tested by

no test coverage detected