summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2016-09-21 18:36:34 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2016-12-06 16:14:56 +0100
commitf988bcecfde819d3d3d2d7227789491fcc0ee430 (patch)
tree2465c7a929daa28e1e4c6bb85438238a6b34e05f /mysql-test/r
parent46dee0d1848e24e39fc236e78a438efa22356f8d (diff)
downloadmariadb-git-f988bcecfde819d3d3d2d7227789491fcc0ee430.tar.gz
MDEV-10776: Server crash on query
Exclude untouched in prepare phese subqueries from the select/unit tree because they became unreachable by execution.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/subselect.result11
-rw-r--r--mysql-test/r/subselect_no_mat.result11
-rw-r--r--mysql-test/r/subselect_no_opts.result11
-rw-r--r--mysql-test/r/subselect_no_scache.result11
-rw-r--r--mysql-test/r/subselect_no_semijoin.result11
5 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 16ab4cf9d82..0a599a64f80 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -7094,3 +7094,14 @@ a
0
DROP TABLE t1;
SET SESSION big_tables=0;
+#
+# MDEV-10776: Server crash on query
+#
+create table t1 (field1 int);
+insert into t1 values (1);
+select round((select 1 from t1 limit 1))
+from t1
+group by round((select 1 from t1 limit 1));
+round((select 1 from t1 limit 1))
+1
+drop table t1;
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index aed4fb39a84..b819b1e4ef9 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -7091,6 +7091,17 @@ a
0
DROP TABLE t1;
SET SESSION big_tables=0;
+#
+# MDEV-10776: Server crash on query
+#
+create table t1 (field1 int);
+insert into t1 values (1);
+select round((select 1 from t1 limit 1))
+from t1
+group by round((select 1 from t1 limit 1));
+round((select 1 from t1 limit 1))
+1
+drop table t1;
set optimizer_switch=default;
select @@optimizer_switch like '%materialization=on%';
@@optimizer_switch like '%materialization=on%'
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index e1f08537788..e1001a51658 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -7089,4 +7089,15 @@ a
0
DROP TABLE t1;
SET SESSION big_tables=0;
+#
+# MDEV-10776: Server crash on query
+#
+create table t1 (field1 int);
+insert into t1 values (1);
+select round((select 1 from t1 limit 1))
+from t1
+group by round((select 1 from t1 limit 1));
+round((select 1 from t1 limit 1))
+1
+drop table t1;
set @optimizer_switch_for_subselect_test=null;
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index b5fa7b1dd8f..e175e7e0072 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -7100,6 +7100,17 @@ a
0
DROP TABLE t1;
SET SESSION big_tables=0;
+#
+# MDEV-10776: Server crash on query
+#
+create table t1 (field1 int);
+insert into t1 values (1);
+select round((select 1 from t1 limit 1))
+from t1
+group by round((select 1 from t1 limit 1));
+round((select 1 from t1 limit 1))
+1
+drop table t1;
set optimizer_switch=default;
select @@optimizer_switch like '%subquery_cache=on%';
@@optimizer_switch like '%subquery_cache=on%'
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index b815559433c..a211d498762 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -7089,5 +7089,16 @@ a
0
DROP TABLE t1;
SET SESSION big_tables=0;
+#
+# MDEV-10776: Server crash on query
+#
+create table t1 (field1 int);
+insert into t1 values (1);
+select round((select 1 from t1 limit 1))
+from t1
+group by round((select 1 from t1 limit 1));
+round((select 1 from t1 limit 1))
+1
+drop table t1;
set @optimizer_switch_for_subselect_test=null;
set @join_cache_level_for_subselect_test=NULL;