Re: [Firebird-devel] IAttachment::execute() returned value

2022-09-19 Thread Alex Peshkoff via Firebird-devel

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.)




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] IAttachment::execute() returned value

2022-09-17 Thread Dimitry Sibiryakov

  Hello All.

  What are rules for plugin's returned value of IAttachment::execute() in the 
case when input transaction is not NULL?


  Should it return NULL?
  Should it return the original transaction?
  Should it return current plugin's original transaction (i.e. 
YTransaction->next if input transaction is from Y-valve)?
  Should reference counter of the returned value to be increased if the 
transaction is the same as input one?


--
  WBR, SD.


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel