Hi,

I found a bug in 6.4.2 which seems to be
related to the char(n) type and shows up
if one assigns a zero-length default value.

Here is an example:


test=> create table t1 (
test->    str1 char(2) default '', <---- note this one
test->    str2 text default '',
test->    str3 text default ''
test-> );
CREATE

test=> insert into t1 values ('aa', 'string2', 'string3');
INSERT 91278 1
test=> insert into t1 (str3) values ('string3');
INSERT 91279 1
test=>test=> select * from t1;
Backend message type 0x44 arrived while idle
Backend message type 0x44 arrived while idle
We have lost the connection to the backend, so further processing is
impossible.  Terminating.

If the table is created as

create table t1 (
   str1 char(2) default '  ',
   str2 text default '',
   str3 text default ''
);

the crash doesn't happen.

Regards
Erich


Fri, 5 Feb 1999 20:30:11 +0100 (MET)
Erich Stamberger <eberger@gewi.kfunigraz.ac.at>
char(n) default '' crashes server
Yes, this crashes under the current backend code too.  We are looking at
it.


> Hi,
> 
> I found a bug in 6.4.2 which seems to be
> related to the char(n) type and shows up
> if one assigns a zero-length default value.
> 
> Here is an example:
> 
> 
> test=> create table t1 (
> test->    str1 char(2) default '', <---- note this one
> test->    str2 text default '',
> test->    str3 text default ''
> test-> );
> CREATE
> 
> test=> insert into t1 values ('aa', 'string2', 'string3');
> INSERT 91278 1
> test=> insert into t1 (str3) values ('string3');
> INSERT 91279 1
> test=>test=> select * from t1;
> Backend message type 0x44 arrived while idle
> Backend message type 0x44 arrived while idle
> We have lost the connection to the backend, so further processing is
> impossible.  Terminating.
> 
> If the table is created as
> 
> create table t1 (
>    str1 char(2) default '  ',
>    str2 text default '',
>    str3 text default ''
> );
> 
> the crash doesn't happen.
> 
> Regards
> Erich
> 
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Mon, 15 Mar 1999 09:52:13 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] char(n) default '' crashes server

This is still an open item.  The crash still happens.

> Hi,
> 
> I found a bug in 6.4.2 which seems to be
> related to the char(n) type and shows up
> if one assigns a zero-length default value.
> 
> Here is an example:
> 
*************> 
> test=> create table t1 (
> test->    str1 char(2) default '', <---- note this one
> test->    str2 text default '',
> test->    str3 text default ''
> test-> );
> CREATE
> 
> test=> insert into t1 values ('aa', 'string2', 'string3');
> INSERT 91278 1
> test=> insert into t1 (str3) values ('string3');
> INSERT 91279 1
> test=>test=> select * from t1;
> Backend message type 0x44 arrived while idle
> Backend message type 0x44 arrived while idle
> We have lost the connection to the backend, so further processing is
> impossible.  Terminating.
> 
> If the table is created as
> 
> create table t1 (
>    str1 char(2) default '  ',
>    str2 text default '',
>    str3 text default ''
> );
> 
> the crash doesn't happen.
> 
> Regards
> Erich
> 
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sun, 9 May 1999 09:02:51 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] char(n) default '' crashes server

This was fixed in 6.5.


> Hi,
> 
> I found a bug in 6.4.2 which seems to be
> related to the char(n) type and shows up
> if one assigns a zero-length default value.
> 
> Here is an example:
> 
> 
> test=> create table t1 (
> test->    str1 char(2) default '', <---- note this one
> test->    str2 text default '',
> test->    str3 text default ''
> test-> );
> CREATE
> 
> test=> insert into t1 values ('aa', 'string2', 'string3');
> INSERT 91278 1
> test=> insert into t1 (str3) values ('string3');
> INSERT 91279 1
> test=>test=> select * from t1;
> Backend message type 0x44 arrived while idle
> Backend message type 0x44 arrived while idle
> We have lost the connection to the backend, so further processing is
> impossible.  Terminating.
> 
> If the table is created as
> 
> create table t1 (
>    str1 char(2) default '  ',
>    str2 text default '',
>    str3 text default ''
> );
> 
> the crash doesn't happen.
> 
> Regards
> Erich
> 
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 6 Jul 1999 21:50:19 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] char(n) default '' crashes server