Open sayJason opened 2 years ago
for mysql 8.0.26, the update was execute success
mysql> SELECT c0 FROM t0 WHERE '' < (t0.c0 REGEXP t0.c0);SELECT c0 FROM t0 WHERE '' < (t0.c0 REGEXP t0.c0);
+------+
| c0 |
+------+
| 0 |
+------+
1 row in set (0.04 sec)
mysql> UPDATE t0 SET c0 = 1 WHERE '' < (t0.c0 REGEXP t0.c0);
Query OK, 1 row affected (0.04 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.26 |
+-----------+
1 row in set (0.05 sec)
mysql> select @@sql_mode;
+-----------------------------------------------------------------------------------------------------------------------+
| @@sql_mode |
+-----------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
+-----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.04 sec)
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
There should be no warning in the SELECT statement. Otherwise, it should be an error in the UPDATE statement since I run the above statements in strict SQL mode.
3. What did you see instead (Required)
SELECT throws a warning like following. UPDATE succeeds without error.
4. What is your TiDB version? (Required)