8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 10:43:03 +01:00

Fixed CORE-4870 - SET COUNT ON: issuing UPDATE on view which was created WITH CHECK OPTION produces wrong number of affected rows (doubled ?).

This commit is contained in:
asfernandes 2015-08-25 15:22:40 +00:00
parent b543944d93
commit 35397f8c05
2 changed files with 9 additions and 2 deletions

View File

@ -6177,7 +6177,7 @@ const StmtNode* ModifyNode::modify(thread_db* tdbb, jrd_req* request, WhichTrigg
if (relation == request->req_top_view_modify)
{
if (whichTrig == ALL_TRIGS || whichTrig == POST_TRIG)
if (!subMod && (whichTrig == ALL_TRIGS || whichTrig == POST_TRIG))
{
request->req_records_updated++;
request->req_records_affected.bumpModified(true);
@ -6625,6 +6625,7 @@ string StoreNode::internalPrint(NodePrinter& printer) const
NODE_PRINT(printer, dsqlRse);
NODE_PRINT(printer, statement);
NODE_PRINT(printer, statement2);
NODE_PRINT(printer, subStore);
//// FIXME-PRINT: NODE_PRINT(printer, validations);
NODE_PRINT(printer, relationSource);
@ -7013,7 +7014,7 @@ const StmtNode* StoreNode::store(thread_db* tdbb, jrd_req* request, WhichTrigger
if (relation == request->req_top_view_store)
{
if (whichTrig == ALL_TRIGS || whichTrig == POST_TRIG)
if (!subStore && (whichTrig == ALL_TRIGS || whichTrig == POST_TRIG))
{
request->req_records_inserted++;
request->req_records_affected.bumpModified(true);

View File

@ -244,6 +244,12 @@ JrdStatement* JrdStatement::makeStatement(thread_db* tdbb, CompilerScratch* csb,
ExprNode::doPass2(tdbb, csb, fieldInfo.validationExpr.getAddress());
}
/*** Print nodes for debugging purposes.
NodePrinter printer;
csb->csb_node->print(printer);
printf("\n%s\n\n\n", printer.getText().c_str());
***/
if (csb->csb_impure > MAX_REQUEST_SIZE)
IBERROR(226); // msg 226 request size limit exceeded