]> granicus.if.org Git - postgresql/commitdiff
Don't assume that 'char' is signed.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 27 Jul 2015 18:48:51 +0000 (21:48 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 27 Jul 2015 18:51:49 +0000 (21:51 +0300)
On some platforms, notably ARM and PowerPC, 'char' is unsigned by
default. This fixes an assertion failure at WAL replay on such platforms.

Reported by Noah Misch. Backpatch to 9.5, where this was broken.

src/include/access/spgist_private.h

index 48dadd5b2c6c7571c0a987fa6a49006ffecd737e..fae10501a24f538b1a839f23ed1e857d71ef88ca 100644 (file)
@@ -465,7 +465,7 @@ typedef struct spgxlogAddNode
         * -1: parent not updated
         *----
         */
-       char            parentBlk;
+       int8            parentBlk;
        OffsetNumber offnumParent;      /* offset within the parent page */
 
        uint16          nodeI;