Debian Codegraph @

mysql-test/suite/ndb/t/ndb_bug30708263.test

raw
1 --source include/have_ndb.inc
2
3 CREATE TABLE e (
4 pk int NOT NULL,
5 col_int_unique int DEFAULT NULL,
6 UNIQUE KEY ix1 (col_int_unique)
7 ) ENGINE=ndbcluster;
8
9 INSERT INTO e values (1, 12), (5, 20), (11, 8), (16, 10);
10
11 let $query = SELECT STRAIGHT_JOIN
12 table1.pk, table2.pk, table3.pk
13 FROM e AS table1
14 LEFT JOIN e AS table2 ON table1.pk = table2.pk
15 LEFT JOIN e AS table3 ON table2.col_int_unique = table3.col_int_unique;
16
17 --echo # If NDB join pushdown is enabled, the query should use nested loop
18 --echo # instead of hash join (NDB expects joins to be executed using nested
19 --echo # loop).
20
21 SET ndb_join_pushdown = on;
22 eval EXPLAIN FORMAT=tree $query;
23 --sorted_result
24 eval $query;
25
26 SET ndb_join_pushdown = off;
27 eval EXPLAIN FORMAT=tree $query;
28 --sorted_result
29 eval $query;
30
31 DROP TABLE e;