Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
N/A
-
None
-
None
Description
MariaDB [test]> create table t1 (i int); |
Query OK, 0 rows affected (0.89 sec) |
|
MariaDB [test]> analyze delete from t1 where 0; |
Query OK, 0 rows affected (0.00 sec) |
|
MariaDB [test]> analyze update t1 set i=1 where 0; |
Query OK, 0 rows affected (0.00 sec) |
For SELECT it works:
MariaDB [test]> analyze select * from t1 where 0; |
+------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+------------------+ |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | r_rows | filtered | r_filtered | Extra | |
+------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+------------------+ |
| 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Impossible WHERE | |
+------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+------------------+ |
1 row in set (0.00 sec) |
EXPLAIN works:
MariaDB [test]> explain delete from t1 where 0; |
+------+-------------+-------+------+---------------+------+---------+------+------+------------------+ |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | |
+------+-------------+-------+------+---------------+------+---------+------+------+------------------+ |
| 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Impossible WHERE | |
+------+-------------+-------+------+---------------+------+---------+------+------+------------------+ |
1 row in set (0.01 sec) |
|
MariaDB [test]> explain update t1 set i=1 where 0; |
+------+-------------+-------+------+---------------+------+---------+------+------+------------------+ |
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | |
+------+-------------+-------+------+---------------+------+---------+------+------+------------------+ |
| 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Impossible WHERE | |
+------+-------------+-------+------+---------------+------+---------+------+------+------------------+ |
1 row in set (0.01 sec) |
commit b95ec135533b13e921aa8de1b9c769d47b2efe60
|
Author: Alexey Botchkov <holyfoot@montyprogram.com>
|
Date: Thu Jun 26 11:37:24 2014 +0500
|
Branch: 10.1
|
Attachments
Issue Links
- relates to
-
MDEV-406 ANALYZE $stmt
- Closed