Mailing List Archive



Back to the month index Back to the list index

Henry Minsky (hqm@ua.com)
Fri, 3 Jan 1997 21:19:16 -0800


Date: Fri, 3 Jan 1997 21:19:16 -0800
From: Henry Minsky <hqm@ua.com>
Message-Id: <199701040519.VAA01776@teller.datawave.net>
Subject: [mSQL] bug with UPDATE  in MSQL-2.0-B 1?

I have been experiencing what looks like a bug with UPDATE statements
in MSQL 2.0 Beta 1. It appears that UPDATE will not work on fields of
type CHAR, only on INT or REAL types.

I have experienced this running the server and client both on Solaris
and on BSDI.

I notice that the rtest suite only does an update on an INT field,
and thus would not catch this problem.

Anyone else get this behavior??

    bash# /usr/local/Hughes/bin/msqladmin version

    Version Details :-

            msqladmin version 2.0 Beta 1
            mSQL server version 2.0 Beta 1
            mSQL protocol version 22
            mSQL connection Localhost via UNIX socket
            Target platform BSD_OS-2.0-i386

    Configuration Details :-

            Default config file /usr/local/Hughes/msql.conf
            TCP socket 1114
            UNIX socket /usr/local/Hughes/msql2.sock
            mSQL user msql
            Admin user root
            Install directory /usr/local/Hughes
            PID file location /usr/local/Hughes/msql2d.pid

Here is an example. The UPDATE only changes the INT fields, and seems
to leave the char fields untouched.

DROP INDEX idx1 FROM employees \g
DROP TABLE employees \g

CREATE TABLE employees (id int, name char(15), salary real, dept char (10), age int) \g

CREATE UNIQUE INDEX idx1 ON employees (id) \g

INSERT INTO employees (id,dept,name,salary,age) VALUES (100,'footwear','Kate Mulgrew',35000,23) \g
INSERT INTO employees (id,dept,name,salary,age) VALUES (101,'sales','Fred Frink',25000,34) \g

select * from employees \g

UPDATE employees SET name = 'SKate Mulgrew', dept = 'xxxyyy', salary = 10000, age=65 WHERE id = 100 \g

select * from employees \g
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!