MySQL Forums
Forum List  »  Quality Assurance

SubSelect hit bug
Posted by: Ondrej Prochazka
Date: January 19, 2012 05:11AM

Is this real bug or my misunderstanding of language?

DROP DATABASE IF EXISTS `bug_example`;
CREATE DATABASE `bug_example`;
USE `bug_example`;

CREATE TABLE `foo` (
`id` int
) ENGINE='InnoDB';
INSERT INTO `foo` (`id`) VALUES ('11');

CREATE TABLE `bar` (
`foo_id` int,
`position` int,
KEY `foo_id` (`foo_id`),
KEY `foo_id_position` (`foo_id`,`position`)
) ENGINE='InnoDB';

SELECT
(SELECT position FROM bar AS b
WHERE b.foo_id = f.id
ORDER BY b.foo_id , b.position
LIMIT 1
) AS maxkey
FROM foo AS f
LIMIT 10;

This create
ERROR 2013 (HY000): Lost connection to MySQL server during query


On the error.log is backtrace and info about "hit the bug".
Tested on Debian 6 MySQL(5.1 and 5.5.19)

Options: ReplyQuote


Subject
Views
Written By
Posted
SubSelect hit bug
2589
January 19, 2012 05:11AM
1226
January 20, 2012 02:53AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.