MySQL 4.1.0 dies on Subselect in Select-Expression
am 19.11.2003 13:40:36 von Jan LanghansHello,
I'm running mysql 4.1.0-alpha-max-nt on Windows 2000, SP3.
The SQL-Script
DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
CREATE TABLE test.nodes (
id BIGINT NOT NULL,
INDEX (id),
PRIMARY KEY (id)) TYPE=MYISAM;
INSERT INTO test.nodes VALUES (1),(2);
SELECT * FROM test.nodes;
CREATE TABLE test.strings (
node BIGINT NOT NULL,
meta INTEGER NOT NULL,
count INTEGER NOT NULL,
revision INTEGER NOT NULL,
deleted DATETIME DEFAULT NULL,
val VARCHAR(255) NOT NULL,
INDEX (node),
UNIQUE (node,revision,count,meta)) TYPE=MYISAM;
INSERT INTO test.strings VALUES
(1,2,0,1,NULL,'String 1'),
(2,1,0,1,NULL,'String 2');
SELECT * FROM test.strings;
SELECT n.id,(SELECT val FROM test.strings WHERE node=n.id AND meta=2 AND count=0 AND deleted IS NULL) AS val FROM test.nodes n WHERE
id=2;
produces the following Output:
id
1
2
node meta count revision deleted val
1 2 0 1 NULL String 1
2 1 0 1 NULL String 2
ERROR 2013 at line 28: Lost connection to MySQL server during query
The Server has to restarted after running the above script.
Any attempt to simplify the script made the bug disapear.
Kind Regards
Jan Langhans
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org