bug in subselect (4.1)

bug in subselect (4.1)

am 04.01.2003 16:30:56 von Georg Richter

Hi,

how-to-repeat:

mysql> create table a (a int);
Query OK, 0 rows affected (0.00 sec)

mysql> create table b (b int);
Query OK, 0 rows affected (0.00 sec)

mysql> insert into a values (1),(2);
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0

mysql> insert into b values (1);
Query OK, 1 row affected (0.00 sec)

mysql> select a from a where a in (select a from a where a in (select b from
b));
+------+
| a |
+------+
| 1 |
| 2 |
+------+
2 rows in set (0.00 sec)

Should return only 1 row (=1)



Regards

Georg

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13402@lists.mysql.com
To unsubscribe, e-mail

Re: bug in subselect (4.1)

am 28.01.2003 13:19:29 von Sanja Byelkin

Hi!

On Sat, Jan 04, 2003 at 04:30:56PM +0100, Georg Richter wrote:
> Hi,
>
> how-to-repeat:
>
> mysql> create table a (a int);
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> create table b (b int);
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> insert into a values (1),(2);
> Query OK, 2 rows affected (0.00 sec)
> Records: 2 Duplicates: 0 Warnings: 0
>
> mysql> insert into b values (1);
> Query OK, 1 row affected (0.00 sec)
>
> mysql> select a from a where a in (select a from a where a in (select b from
> b));
> +------+
> | a |
> +------+
> | 1 |
> | 2 |
> +------+
> 2 rows in set (0.00 sec)
>
> Should return only 1 row (=1)

Thank you for bugreport. This bug is gone, too

--
For technical support contracts, visit https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Oleksandr Byelkin
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Lugansk, Ukraine
<___/ www.mysql.com

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13611@lists.mysql.com
To unsubscribe, e-mail