From: <ro...@us...> - 2014-05-09 20:26:03
|
Revision: 59568 http://sourceforge.net/p/firebird/code/59568 Author: robocop Date: 2014-05-09 20:26:01 +0000 (Fri, 09 May 2014) Log Message: ----------- It seems it's possible to restrict gbak more on deletions. Thanks Vlad for hint on TDBB_dont_post_dfw. Modified Paths: -------------- firebird/trunk/src/jrd/vio.cpp Modified: firebird/trunk/src/jrd/vio.cpp =================================================================== --- firebird/trunk/src/jrd/vio.cpp 2014-05-09 11:38:23 UTC (rev 59567) +++ firebird/trunk/src/jrd/vio.cpp 2014-05-09 20:26:01 UTC (rev 59568) @@ -192,11 +192,13 @@ // inconsistencies while restoring. Used in VIO_erase. inline void check_gbak_cheating_delete(thread_db* tdbb, const jrd_rel* relation) { - // For now, it will be left the same as the above, because I don't know - // how to check I'm inside DFW and DFW does deletions. + // TDBB_dont_post_dfw signals that we are in DFW. const ULONG uflags = tdbb->getAttachment()->att_flags; - if ((uflags & ATT_gbak_attachment) && !(uflags & ATT_creator)) //relation->rel_id != rel_segments) + if ((uflags & ATT_gbak_attachment) && + (!(uflags & ATT_creator)) || relation->rel_id != rel_segments && !(tdbb->tdbb_flags & TDBB_dont_post_dfw)) + { protect_system_table_delupd(tdbb, relation, "DELETE", true); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |