Commit c10908e0 authored by Marc G. Fournier's avatar Marc G. Fournier

Symptom:

        select  from  a  table  with  attrs  (a  int, b char(20))
        crashed in bpcharout() (palloc of -1 bytes). But a  table
        with attrs (a int, b varchar(20)) worked.

From: Jan Wieck <jwieck@debis.com>
parent 692cfec8
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.33 1998/02/05 03:47:08 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.34 1998/02/05 15:08:49 scrappy Exp $
* *
* NOTES * NOTES
* The old interface functions have been converted to macros * The old interface functions have been converted to macros
...@@ -554,7 +554,7 @@ nocachegetattr(HeapTuple tup, ...@@ -554,7 +554,7 @@ nocachegetattr(HeapTuple tup,
while (att[j]->attcacheoff > 0) while (att[j]->attcacheoff > 0)
j++; j++;
if (!VARLENA_FIXED_SIZE(att[j])) if (!VARLENA_FIXED_SIZE(att[j - 1]))
off = att[j - 1]->attcacheoff + att[j - 1]->attlen; off = att[j - 1]->attcacheoff + att[j - 1]->attlen;
else else
off = att[j - 1]->attcacheoff + att[j - 1]->atttypmod; off = att[j - 1]->attcacheoff + att[j - 1]->atttypmod;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment