summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/explain_json.result35
-rw-r--r--mysql-test/t/explain_json.test12
2 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/r/explain_json.result b/mysql-test/r/explain_json.result
index 0824132de05..d0a0b8f5be3 100644
--- a/mysql-test/r/explain_json.result
+++ b/mysql-test/r/explain_json.result
@@ -778,3 +778,38 @@ EXPLAIN
}
}
DROP TABLE t1,t2;
+#
+# MDEV-7264: Assertion `0' failed in subselect_engine::get_identifier() on EXPLAIN JSON
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (3),(4);
+EXPLAIN FORMAT=JSON SELECT * FROM t1 WHERE a <> ALL ( SELECT b FROM t2 );
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(not(<in_optimizer>(t1.a,t1.a in (subquery#2))))"
+ },
+ "subqueries": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100
+ }
+ }
+ }
+ ]
+ }
+}
+DROP TABLE t1, t2;
diff --git a/mysql-test/t/explain_json.test b/mysql-test/t/explain_json.test
index 476cb0d3df6..b4f90392c53 100644
--- a/mysql-test/t/explain_json.test
+++ b/mysql-test/t/explain_json.test
@@ -167,3 +167,15 @@ EXPLAIN FORMAT=JSON SELECT * FROM t1 AS outer_t1 WHERE a <> ALL ( SELECT a FROM
DROP TABLE t1,t2;
+--echo #
+--echo # MDEV-7264: Assertion `0' failed in subselect_engine::get_identifier() on EXPLAIN JSON
+--echo #
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (3),(4);
+
+EXPLAIN FORMAT=JSON SELECT * FROM t1 WHERE a <> ALL ( SELECT b FROM t2 );
+DROP TABLE t1, t2;
+