Debian Codegraph @

mysql-test/suite/secondary_engine/inc/explain.inc

raw
1 --disable_query_log
2 eval INSTALL PLUGIN mock SONAME '$MOCK_PLUGIN';
3 --enable_query_log
4
5 --echo #
6 --echo # Bug#28556942: ADD USING SECONDARY ENGINE TO EXPLAIN
7 --echo #
8 CREATE TABLE t1 (a INT) SECONDARY_ENGINE MOCK;
9 --echo # Before table is loaded, the secondary engine should not be used.
10 ANALYZE TABLE t1;
11 # Traditional format is not supported with hypergraph.
12 --error 0, ER_HYPERGRAPH_NOT_SUPPORTED_YET
13 EXPLAIN SELECT * FROM t1;
14 EXPLAIN FORMAT=JSON SELECT * FROM t1;
15 ALTER TABLE t1 SECONDARY_LOAD;
16 --echo # After table is loaded, the secondary engine should be used.
17 ANALYZE TABLE t1;
18 # As an exception, the traditional format is allowed with hypergraph
19 # when using a secondary engine. It does not show the full plan.
20 EXPLAIN SELECT * FROM t1;
21 EXPLAIN FORMAT=JSON SELECT * FROM t1, t1 t2 WHERE t1.a = t2.a;
22 DROP TABLE t1;
23
24 --disable_query_log
25 UNINSTALL PLUGIN mock;
26 --enable_query_log