summaryrefslogtreecommitdiff
path: root/mysql-test/r/explain_json.result
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2014-12-06 20:33:25 +0300
committerSergei Petrunia <psergey@askmonty.org>2014-12-06 20:33:25 +0300
commit913b7672c5fe2db750a382685f0810d383b43faa (patch)
tree98f8456628e218820a1e4bfd35b72d457682f7d1 /mysql-test/r/explain_json.result
parentdb21fddc3740dfa48f3443751c48282467afac5e (diff)
parenteeef80d09f8045d99963a2bf2fa92595c55bb26d (diff)
downloadmariadb-git-913b7672c5fe2db750a382685f0810d383b43faa.tar.gz
Merge bb-10.1-explain-json into 10.1
Diffstat (limited to 'mysql-test/r/explain_json.result')
-rw-r--r--mysql-test/r/explain_json.result54
1 files changed, 53 insertions, 1 deletions
diff --git a/mysql-test/r/explain_json.result b/mysql-test/r/explain_json.result
index d0a0b8f5be3..5998912e0c5 100644
--- a/mysql-test/r/explain_json.result
+++ b/mysql-test/r/explain_json.result
@@ -1,4 +1,4 @@
-drop table if exists t0,t1;
+drop table if exists t0,t1,t2;
create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
explain format=json select * from t0;
@@ -551,6 +551,7 @@ EXPLAIN
{
"query_block": {
"select_id": 1,
+ "const_condition": "1",
"table": {
"table_name": "t1",
"access_type": "ALL",
@@ -813,3 +814,54 @@ EXPLAIN
}
}
DROP TABLE t1, t2;
+#
+# Join's constant expression
+#
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int, b int);
+insert into t1 select tbl1.a+10*tbl2.a, 1234 from t0 tbl1, t0 tbl2;
+explain format=json
+select * from t0
+where
+20000 > all (select max(tbl1.a + tbl2.a)
+from t1 tbl1, t1 tbl2 where tbl1.b=tbl2.b);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "const_condition": "<not>(<in_optimizer>(20000,(<max>(subquery#2) >= 20000)))",
+ "table": {
+ "table_name": "t0",
+ "access_type": "ALL",
+ "rows": 10,
+ "filtered": 100
+ },
+ "subqueries": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "tbl1",
+ "access_type": "ALL",
+ "rows": 100,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "tbl2",
+ "access_type": "ALL",
+ "rows": 100,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "join_type": "BNL",
+ "attached_condition": "(tbl2.b = tbl1.b)"
+ }
+ }
+ }
+ ]
+ }
+}
+drop table t1;
+drop table t0;