Bug #14556 | Double-brackets cause "Subquery returns more than 1 row" error | ||
---|---|---|---|
Submitted: | 2 Nov 2005 0:54 | Modified: | 2 Dec 2005 8:57 |
Reporter: | Marc Hodgins (Candidate Quality Contributor) | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1.14 | OS: | Windows (Windows 2000) |
Assigned to: | CPU Architecture: | Any |
[2 Nov 2005 0:54]
Marc Hodgins
[2 Nov 2005 8:57]
Valeriy Kravchuk
Thank you for a problem report. Sorry, but I can't repeat the problem you described on latest 4.1.16 and 5.0.16 builds with the following actions: mysql> create table test(c1 int); Query OK, 0 rows affected (0,01 sec) mysql> insert into test values (1), (2); Query OK, 2 rows affected (0,00 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> create table test2 as select * from test; Query OK, 2 rows affected (0,09 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> delete from test where c1 in (select c1 from test2 where c1=1); Query OK, 1 row affected (0,10 sec) mysql> select * from test; +------+ | c1 | +------+ | 2 | +------+ 1 row in set (0,00 sec) mysql> delete from test where c1 in ((select c1 from test2 where c1=2)); Query OK, 1 row affected (0,01 sec) mysql> select * from test; Empty set (0,00 sec) mysql> select version(); +-----------+ | version() | +-----------+ | 5.0.16 | +-----------+ 1 row in set (0,00 sec) Now on 4.1.16: mysql> create table test(c1 int); Query OK, 0 rows affected (0,04 sec) mysql> insert into test values (1), (2); Query OK, 2 rows affected (0,00 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> create table test2 as select * from test; Query OK, 2 rows affected (0,04 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> delete from test where c1 in (select c1 from test2 where c1=1); Query OK, 1 row affected (0,05 sec) mysql> delete from test where c1 in ((select c1 from test2 where c1=2)); Query OK, 1 row affected (0,02 sec) mysql> select * from test; Empty set (0,00 sec) mysql> select version(); +-----------+ | version() | +-----------+ | 4.1.16 | +-----------+ 1 row in set (0,00 sec) Can it be so, that subquery really returns more than 1 row? Please, provide a complete simple test case, like mine.
[3 Dec 2005 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".