diff options
Diffstat (limited to 'mysql-test/main/derived_cond_pushdown.result')
-rw-r--r-- | mysql-test/main/derived_cond_pushdown.result | 171 |
1 files changed, 86 insertions, 85 deletions
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result index 4fc9a0a213f..f47920c0e33 100644 --- a/mysql-test/main/derived_cond_pushdown.result +++ b/mysql-test/main/derived_cond_pushdown.result @@ -3454,10 +3454,10 @@ a b max_c avg_c a b max_c avg_c a b min_c a b c d 6 20 315 279.3333 6 20 315 279.3333 6 20 214 6 20 315 279 6 20 315 279.3333 6 20 315 279.3333 8 33 114 8 80 800 314 6 20 315 279.3333 6 20 315 279.3333 6 20 214 6 23 303 909 -6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 20 315 279 -6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 23 303 909 8 33 404 213.6667 6 20 315 279.3333 8 33 114 8 64 248 107 8 33 404 213.6667 6 20 315 279.3333 8 33 114 8 80 800 314 +6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 20 315 279 +6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 23 303 909 8 33 404 213.6667 8 33 404 213.6667 7 11 708 7 13 312 406 8 33 404 213.6667 8 33 404 213.6667 8 33 114 8 64 248 107 8 33 404 213.6667 8 33 404 213.6667 6 20 214 6 20 315 279 @@ -3472,10 +3472,10 @@ a b max_c avg_c a b max_c avg_c a b min_c a b c d 6 20 315 279.3333 6 20 315 279.3333 6 20 214 6 20 315 279 6 20 315 279.3333 6 20 315 279.3333 8 33 114 8 80 800 314 6 20 315 279.3333 6 20 315 279.3333 6 20 214 6 23 303 909 -6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 20 315 279 -6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 23 303 909 8 33 404 213.6667 6 20 315 279.3333 8 33 114 8 64 248 107 8 33 404 213.6667 6 20 315 279.3333 8 33 114 8 80 800 314 +6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 20 315 279 +6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 23 303 909 8 33 404 213.6667 8 33 404 213.6667 7 11 708 7 13 312 406 8 33 404 213.6667 8 33 404 213.6667 8 33 114 8 64 248 107 8 33 404 213.6667 8 33 404 213.6667 6 20 214 6 20 315 279 @@ -3487,8 +3487,8 @@ and (v1.max_c<500) and (v3.a=t2.a) and (v2.max_c>300); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where 1 PRIMARY <derived4> ref key0 key0 5 test.t2.a 2 Using where -1 PRIMARY <derived3> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join) -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (incremental, BNL join) +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join) +1 PRIMARY <derived3> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (incremental, BNL join) 4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort 3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort @@ -3538,19 +3538,19 @@ EXPLAIN }, "block-nl-join": { "table": { - "table_name": "<derived3>", + "table_name": "<derived2>", "access_type": "ALL", "rows": 20, "filtered": 100, - "attached_condition": "v2.max_c > 300" + "attached_condition": "v1.max_c < 500" }, "buffer_type": "flat", "buffer_size": "715", "join_type": "BNL", "materialized": { "query_block": { - "select_id": 3, - "having_condition": "max_c < 707 and max_c > 300", + "select_id": 2, + "having_condition": "max_c < 707 and max_c < 500", "filesort": { "sort_key": "t1.a, t1.b", "temporary_table": { @@ -3558,8 +3558,7 @@ EXPLAIN "table_name": "t1", "access_type": "ALL", "rows": 20, - "filtered": 100, - "attached_condition": "t1.a > 5" + "filtered": 100 } } } @@ -3568,20 +3567,20 @@ EXPLAIN }, "block-nl-join": { "table": { - "table_name": "<derived2>", + "table_name": "<derived3>", "access_type": "ALL", "rows": 20, "filtered": 100, - "attached_condition": "v1.max_c < 500" + "attached_condition": "v2.max_c > 300" }, "buffer_type": "incremental", "buffer_size": "9Kb", "join_type": "BNL", - "attached_condition": "v1.a = v2.a or v1.a = t2.a", + "attached_condition": "v2.a = v1.a or v1.a = t2.a", "materialized": { "query_block": { - "select_id": 2, - "having_condition": "max_c < 707 and max_c < 500", + "select_id": 3, + "having_condition": "max_c < 707 and max_c > 300", "filesort": { "sort_key": "t1.a, t1.b", "temporary_table": { @@ -3589,7 +3588,8 @@ EXPLAIN "table_name": "t1", "access_type": "ALL", "rows": 20, - "filtered": 100 + "filtered": 100, + "attached_condition": "t1.a > 5" } } } @@ -9684,11 +9684,22 @@ EXPLAIN "query_block": { "select_id": 1, "table": { - "table_name": "<derived2>", + "table_name": "t1", "access_type": "ALL", "rows": 2, "filtered": 100, - "attached_condition": "1 in (0,dt1.a)", + "attached_condition": "1 in (0,t1.a) and t1.a is not null" + }, + "table": { + "table_name": "<derived2>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["a"], + "ref": ["test.t1.a"], + "rows": 2, + "filtered": 100, "materialized": { "query_block": { "select_id": 2, @@ -9706,18 +9717,6 @@ EXPLAIN } } } - }, - "block-nl-join": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100 - }, - "buffer_type": "flat", - "buffer_size": "65", - "join_type": "BNL", - "attached_condition": "t1.a = dt1.a" } } } @@ -9743,11 +9742,22 @@ EXPLAIN "query_block": { "select_id": 1, "table": { - "table_name": "<derived2>", + "table_name": "t1", "access_type": "ALL", "rows": 2, "filtered": 100, - "attached_condition": "dt.a in (1,dt.a)", + "attached_condition": "t1.a in (1,t1.a) and t1.a is not null" + }, + "table": { + "table_name": "<derived2>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["a"], + "ref": ["test.t1.a"], + "rows": 2, + "filtered": 100, "materialized": { "query_block": { "select_id": 2, @@ -9765,18 +9775,6 @@ EXPLAIN } } } - }, - "block-nl-join": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100 - }, - "buffer_type": "flat", - "buffer_size": "119", - "join_type": "BNL", - "attached_condition": "t1.a = dt.a" } } } @@ -10376,11 +10374,22 @@ EXPLAIN "query_block": { "select_id": 1, "table": { - "table_name": "<derived3>", + "table_name": "t1", "access_type": "ALL", "rows": 2, "filtered": 100, - "attached_condition": "t.f2 < 2", + "attached_condition": "t1.f2 < 2 and t1.f2 is not null" + }, + "table": { + "table_name": "<derived3>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["f2"], + "ref": ["test.t1.f2"], + "rows": 2, + "filtered": 100, "materialized": { "query_block": { "select_id": 3, @@ -10393,13 +10402,6 @@ EXPLAIN } } } - }, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "t1.f2 = t.f2" } } } @@ -10417,11 +10419,22 @@ EXPLAIN "query_block": { "select_id": 1, "table": { - "table_name": "<derived3>", + "table_name": "t1", "access_type": "ALL", "rows": 2, "filtered": 100, - "attached_condition": "t.f2 < 2", + "attached_condition": "t1.f2 < 2 and t1.f2 is not null" + }, + "table": { + "table_name": "<derived3>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["f2"], + "ref": ["test.t1.f2"], + "rows": 1, + "filtered": 100, "materialized": { "query_block": { "select_id": 3, @@ -10436,18 +10449,6 @@ EXPLAIN } } } - }, - "block-nl-join": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100 - }, - "buffer_type": "flat", - "buffer_size": "65", - "join_type": "BNL", - "attached_condition": "t1.f2 = t.f2" } } } @@ -14388,8 +14389,8 @@ a b c a b c 3 21 500 3 21 231 explain select * from v1,t2 where (v1.b=t2.b) and (v1.a<4); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 Using where -1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where; Using join buffer (flat, BNL join) +1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where +1 PRIMARY <derived2> ref key0 key0 5 test.t2.b 2 Using where 2 DERIVED t3 range i1 i1 5 NULL 2 Using index condition 3 UNION t3 range i1 i1 5 NULL 1 Using index condition NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL @@ -14399,9 +14400,21 @@ EXPLAIN "query_block": { "select_id": 1, "table": { - "table_name": "<derived2>", + "table_name": "t2", "access_type": "ALL", - "rows": 3, + "rows": 9, + "filtered": 100, + "attached_condition": "t2.b is not null" + }, + "table": { + "table_name": "<derived2>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["b"], + "ref": ["test.t2.b"], + "rows": 2, "filtered": 100, "attached_condition": "v1.a < 4", "materialized": { @@ -14447,18 +14460,6 @@ EXPLAIN } } } - }, - "block-nl-join": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 9, - "filtered": 100 - }, - "buffer_type": "flat", - "buffer_size": "173", - "join_type": "BNL", - "attached_condition": "t2.b = v1.b" } } } |