Subject: mysql/alpha bug
To: None <tech-pkg@netbsd.org>
From: Eric Ding <ericding@MIT.EDU>
List: tech-pkg
Date: 06/17/1999 14:45:30
Hi,

I'm running MySQL 3.22.22 on NetBSD/Alpha 1.4.  Everything was compiled
as part of the /usr/pkgsrc package, with egcs 1.1.1.

I've discovered what appears to be a bug in MySQL on the NetBSD/alpha
port.  The bug has to do with the "text" and "blob" datatypes, which are
used to store strings that can be larger than 255 characters.  On the
Alpha port, creating a table with text (as opposed to varchar) datatypes
and then adding entries in somehow corrupts the table.  If I try do a
"select *" command, then the server will often crash.  When it doesn't
crash, it shows garbled/chopped text or none at all.  I've included below
a log from a MySQL session.

   # mysql -u root -p test;
   Enter password: 
   Welcome to the MySQL monitor.  Commands end with ; or \g.
   Your MySQL connection id is 4 to server version: 3.22.22

   Type 'help' for help.

   mysql> create table chair ( user text, name text );
   Query OK, 0 rows affected (0.07 sec)

   mysql> insert into chair values ('imontoya', 'Inigo Montoya');
   Query OK, 1 row affected (0.00 sec)

   mysql> select * from chair;
   +----------+---------------+
   | user     | name          |
   +----------+---------------+
   |          |               |
   +----------+---------------+
   1 row in set (0.01 sec)

If I exit and restart the MySQL client, then run the "select" command
again, the MySQL server dies with a segmentation fault.  On the x86
platform, I don't have these problems; the "select *" command returns the
expected results:

   mysql> select * from chair;
   +----------+---------------+
   | user     | name          |
   +----------+---------------+
   | imontoya | Inigo Montoya |
   +----------+---------------+
   1 row in set (0.01 sec)

Also, if I change the datatype to VARCHAR() on alpha, then the table
works, i.e.,

   mysql> create table chair ( user varchar(255), name varchar(255) );
   Query OK, 0 rows affected (0.07 sec)

   mysql> insert into chair values ('imontoya', 'Inigo Montoya');
   Query OK, 1 row affected (0.00 sec)

   mysql> select * from chair;
   +----------+---------------+
   | user     | name          |
   +----------+---------------+
   | imontoya | Inigo Montoya |
   +----------+---------------+
   1 row in set (0.00 sec)

Eric