release it in a subtransaction abort, but this neglects possibility that
someone outside SPI already did. Fix is for spi.c to forget about a tuptable
as soon as it's handed it back to the caller.
Per bug #2817 from Michael Andreen.
SPI_lastoid = my_lastoid;
SPI_tuptable = my_tuptable;
+ /* tuptable now is caller's responsibility, not SPI's */
+ _SPI_current->tuptable = NULL;
+
return my_res;
}
SPI_processed = _SPI_current->processed;
SPI_tuptable = _SPI_current->tuptable;
+ /* tuptable now is caller's responsibility, not SPI's */
+ _SPI_current->tuptable = NULL;
+
/* Pop the SPI stack */
_SPI_end_call(true);
}