tidb icon indicating copy to clipboard operation
tidb copied to clipboard

redundant projection on top of table dual plan

Open eurekaka opened this issue 8 years ago • 0 comments

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.
mysql> explain select * from t where 1 = 0;
+-------------------+-------+------+---------------+
| id                | count | task | operator info |
+-------------------+-------+------+---------------+
| Projection_5      | 0.00  | root | test.t.id     |
| └─TableDual_6     | 0.00  | root | rows:0        |
+-------------------+-------+------+---------------+
2 rows in set (0.00 sec)
  1. What did you expect to see?

Just a table dual plan

  1. What did you see instead?

A redundant projection

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
mysql> select tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                                                   |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v2.1.0-rc.2-3-g7f6babb
Git Commit Hash: 7f6babb2b4fbafb29e7f550d6c67917725b38e2b
Git Branch: master
UTC Build Time: 2018-09-09 12:17:02
GoVersion: go version go1.11rc1 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

eurekaka avatar Sep 17 '18 05:09 eurekaka