Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
5.5, 10.0, 10.1
-
None
Description
CREATE OR REPLACE ALGORITHM = MERGE VIEW v AS |
SELECT 1 a, SLEEP(3) b, SLEEP(3) c FROM DUAL; |
|
|
EXPLAIN EXTENDED
|
SELECT a FROM v; |
EXPLAIN EXTENDED shows us what we want to see... but it's a lie
If you execute the SELECT, it will sleep for 6 seconds, because columns b and c are evaluated.
Note that the bug will NOT happen in this case:
\W
|
|
|
CREATE OR REPLACE TABLE t (a INT) ENGINE = InnoDB; |
INSERT INTO t VALUES (1); |
|
|
CREATE OR REPLACE ALGORITHM = MERGE VIEW v AS |
SELECT a, SLEEP(3) b, SLEEP(3) c FROM t; |
|
|
EXPLAIN EXTENDED
|
SELECT a FROM v; |