The csb->csb_validate_expr becomes true if an ancestor of the current node (the one being passed in) in the parse tree is a validation. "Ancestor" does not include the current node being passed in as an argument. If we are in a "validate subtree" (as determined by the csb->csb_validate_expr), we must not post update access to the fields involved in the validation clause. (See the call for CMP_post
| 10901 | // post update access to the fields involved in the validation clause. |
| 10902 | // (See the call for CMP_post_access in this function.) |
| 10903 | static void pass1Validations(thread_db* tdbb, CompilerScratch* csb, Array<ValidateInfo>& validations) |
| 10904 | { |
| 10905 | AutoSetRestore<bool> autoValidateExpr(&csb->csb_validate_expr, true); |
| 10906 | |
| 10907 | for (Array<ValidateInfo>::iterator i = validations.begin(); i != validations.end(); ++i) |
| 10908 | { |
| 10909 | DmlNode::doPass1(tdbb, csb, i->boolean.getAddress()); |
| 10910 | DmlNode::doPass1(tdbb, csb, i->value.getAddress()); |
| 10911 | } |
| 10912 | } |
| 10913 | |
| 10914 | ForNode* pass2FindForNode(StmtNode* node, StreamType stream) |
| 10915 | { |
no test coverage detected