Debian Codegraph @

mysql-test/suite/secondary_engine/r/optimizer_trace.result

raw
1 #
2 # Bug#30625270: ADD SECONDARY_ENGINE_COST_THRESHOLD NOT MET IN TRACE
3 # RESPONSE WHEN OFFLOAD FAILS
4 #
5 CREATE TABLE t(x INT) SECONDARY_ENGINE = MOCK;
6 INSERT INTO t VALUES (1), (2), (3);
7 ALTER TABLE t SECONDARY_LOAD;
8 ANALYZE TABLE t;
9 Table Op Msg_type Msg_text
10 test.t analyze status OK
11 SET optimizer_trace = 'enabled=on';
12 SELECT /*+ SET_VAR(secondary_engine_cost_threshold=100000) */
13 * FROM t ORDER BY x;
14 x
15 1
16 2
17 3
18 SET optimizer_trace = 'enabled=off';
19 SELECT JSON_PRETTY(JSON_REMOVE(TRACE->'$**.secondary_engine_not_used',
20 '$[0].cost')) AS trace
21 FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
22 trace
23 [
24 {
25 "reason": "The estimated query cost does not exceed secondary_engine_cost_threshold.",
26 "threshold": 100000
27 }
28 ]
29 DROP TABLE t;