From: Alex P. <pes...@ma...> - 2022-09-19 08:19:27
|
On 9/17/22 18:54, Dimitry Sibiryakov wrote: > Hello All. > > What are rules for plugin's returned value of IAttachment::execute() > in the case when input transaction is not NULL? > That depends upon statement executed. > Should it return NULL? In a case of commit/rollback - yes. > Should it return the original transaction? For all non-transacton-control statements - yes. > Should it return current plugin's original transaction (i.e. > YTransaction->next if input transaction is from Y-valve)? No matter of YValve - when SQL statement does not modify transaction (not start and not commit) same value to be returned. > Should reference counter of the returned value to be increased if the > transaction is the same as input one? > Not. When new transaction is created it's ref/counter is set to 1. (This exactly matches logic of assignRefNoIncr() function.) |