]> granicus.if.org Git - postgresql/commitdiff
Fix bug in clearing of virtual tuple slot.
authorAndres Freund <andres@anarazel.de>
Wed, 6 Mar 2019 17:54:38 +0000 (09:54 -0800)
committerAndres Freund <andres@anarazel.de>
Wed, 6 Mar 2019 17:54:38 +0000 (09:54 -0800)
I broke/typoed this in 4da597edf1bae0c. Astonishingly this mostly
doesn't cause breakage, except when trying to change the tuple
descriptor of a slot (because TTS_FLAG_FIXED is assumed to be set).

Author: Andres Freund

src/backend/executor/execTuples.c

index 2a12bd56ea9dd6ba76103bb3f4de051444d4e804..41fa374b6fc8294a17d4136bc689907825950972 100644 (file)
@@ -114,7 +114,7 @@ tts_virtual_clear(TupleTableSlot *slot)
                pfree(vslot->data);
                vslot->data = NULL;
 
-               slot->tts_flags = ~TTS_FLAG_SHOULDFREE;
+               slot->tts_flags &= ~TTS_FLAG_SHOULDFREE;
        }
 
        slot->tts_nvalid = 0;