| 6419 | |
| 6420 | |
| 6421 | static 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 | |
| 6451 | static void protect_system_table_delupd(thread_db* tdbb, |
no test coverage detected