Bug #79246 | "select null=ANY(non-empty subquery)" returns 0 | ||
---|---|---|---|
Submitted: | 12 Nov 2015 9:15 | Modified: | 27 Nov 2019 22:43 |
Reporter: | Su Dylan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 5.0/5.1/5.5/5.6/5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[12 Nov 2015 9:15]
Su Dylan
[12 Nov 2015 10:23]
MySQL Verification Team
Thank you for the bug report. Version: 5.0/5.1/5.5/5.6/5.7 affected: C:\dbs>c:\dbs\5.7\bin\mysql -uroot -p --port=3570 --prompt="mysql 5.7 > " Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 5.7.10 Source distribution PULL: 2015-NOV-07 Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 5.7 > use test Database changed mysql 5.7 > mysql 5.7 > drop table if exists t1,t2; Query OK, 0 rows affected (0.03 sec) mysql 5.7 > create table t1(c1 int primary key); Query OK, 0 rows affected (0.03 sec) mysql 5.7 > create table t2(c1 int); Query OK, 0 rows affected (0.03 sec) mysql 5.7 > insert into t1 values(1),(2); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql 5.7 > insert into t2 values(1),(2); Query OK, 2 rows affected (0.01 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql 5.7 > select null=any(select c1 from t1), null=any(select c1 from t2); +-----------------------------+-----------------------------+ | null=any(select c1 from t1) | null=any(select c1 from t2) | +-----------------------------+-----------------------------+ | 0 | NULL | +-----------------------------+-----------------------------+ 1 row in set (0.00 sec) mysql 5.7 > alter table t1 drop primary key; Query OK, 2 rows affected (0.17 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql 5.7 > select null=any(select c1 from t1), null=any(select c1 from t2); +-----------------------------+-----------------------------+ | null=any(select c1 from t1) | null=any(select c1 from t2) | +-----------------------------+-----------------------------+ | NULL | NULL | +-----------------------------+-----------------------------+ 1 row in set (0.00 sec)
[27 Nov 2019 22:43]
Roy Lyseng
Posted by developer: Fixed in 5.7.29