一个逻辑问题:select 1=1 from dual 的结果,理论上应该和select 1=1 from dual where (null)并上select 1=1from dual where !(null)的结果一致。实际没有

测试环境为:https://docs.pingcap.com/zh/tidb/stable/quick-start-with-tidb的TIUP单机部署。
select 1=1 from dual ;
select 1=1 from dual where (null);
select 1=1from dual where !(null);详见截图。
image

我这边测试了一下,跟 MySQL 行为是一致的。

root@127.0.0.1 : (none) 08:47:29> select 1 = 1 from dual;
+-------+
| 1 = 1 |
+-------+
|     1 |
+-------+
1 row in set (0.00 sec)

root@127.0.0.1 : (none) 08:47:50> select 1 = 1 from dual where(null);
Empty set (0.00 sec)

root@127.0.0.1 : (none) 08:48:05> select 1 = 1 from  dual where !(null);
Empty set, 1 warning (0.00 sec)

Warning (Code 1287): '!' is deprecated and will be removed in a future release. Please use NOT instead
root@127.0.0.1 : (none) 08:48:27> select 1 = 1 from  dual where not null;
Empty set (0.00 sec)

root@127.0.0.1 : (none) 08:48:50> select version();
+-----------+
| version() |
+-----------+
| 8.0.19    |
+-----------+
1 row in set (0.00 sec)