summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/connect_debug.result5
-rw-r--r--mysql-test/r/ctype_ucs.result31
-rw-r--r--mysql-test/r/ctype_utf8mb4.result23
-rw-r--r--mysql-test/r/func_misc.result11
-rw-r--r--mysql-test/r/join_outer.result18
-rw-r--r--mysql-test/r/join_outer_jcl6.result18
-rw-r--r--mysql-test/r/mysqld--help.result4
-rw-r--r--mysql-test/r/parser.result7
-rw-r--r--mysql-test/r/ps_qc_innodb.result23
-rw-r--r--mysql-test/r/subselect4.result35
-rw-r--r--mysql-test/r/subselect_mat.result15
-rw-r--r--mysql-test/r/view.result305
12 files changed, 381 insertions, 114 deletions
diff --git a/mysql-test/r/connect_debug.result b/mysql-test/r/connect_debug.result
new file mode 100644
index 00000000000..0452b238db9
--- /dev/null
+++ b/mysql-test/r/connect_debug.result
@@ -0,0 +1,5 @@
+set @old_dbug=@@global.debug_dbug;
+set global debug_dbug='+d,auth_disconnect';
+create user 'bad' identified by 'worse';
+set global debug_dbug=@old_dbug;
+drop user bad;
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index 6520694a804..59d88414cab 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -4590,6 +4590,37 @@ Field Type Null Key Default Extra
c1 mediumtext YES NULL
DROP TABLE t1;
#
+# MDEV-15624 Changing the default character set to utf8mb4 changes query evaluation in a very surprising way
+#
+SET NAMES utf8;
+CREATE TABLE t1 (id INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT COUNT(DISTINCT c) FROM (SELECT id, REPLACE(uuid_short(), '0', CAST('o' AS CHAR CHARACTER SET ucs2)) AS c FROM t1) AS d1;
+COUNT(DISTINCT c)
+3
+SELECT DISTINCT REPLACE(uuid_short(), '0', CAST('o' AS CHAR CHARACTER SET ucs2)) AS c FROM t1;
+c
+xxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxx
+SELECT COUNT(DISTINCT c) FROM (SELECT id, INSERT(uuid_short(), 1, 1, CAST('0' AS CHAR CHARACTER SET ucs2)) AS c FROM t1) AS d1;
+COUNT(DISTINCT c)
+3
+SELECT DISTINCT INSERT(uuid_short(), 1, 1, CAST('0' AS CHAR CHARACTER SET ucs2)) AS c FROM t1;
+c
+xxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxx
+SELECT COUNT(DISTINCT c) FROM (SELECT id, CONCAT(uuid_short(), CAST('0' AS CHAR CHARACTER SET ucs2)) AS c FROM t1) AS d1;
+COUNT(DISTINCT c)
+3
+SELECT DISTINCT CONCAT(uuid_short(), CAST('0' AS CHAR CHARACTER SET ucs2)) AS c FROM t1;
+c
+xxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxx
+xxxxxxxxxxxxxxxxx
+DROP TABLE t1;
+#
# End of 5.5 tests
#
#
diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result
index ff9c155e445..f31b7a6781e 100644
--- a/mysql-test/r/ctype_utf8mb4.result
+++ b/mysql-test/r/ctype_utf8mb4.result
@@ -2859,6 +2859,29 @@ SELECT LENGTH(data) AS len FROM (SELECT REPEAT('☃', 65536) AS data ) AS sub;
len
196608
#
+# MDEV-15624 Changing the default character set to utf8mb4 changes query evaluation in a very surprising way
+#
+SET NAMES utf8mb4;
+CREATE TABLE t1 (id INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT COUNT(DISTINCT c) FROM (SELECT id, REPLACE(UUID(), "-", "") AS c FROM t1) AS d1;
+COUNT(DISTINCT c)
+3
+SELECT DISTINCT INSERT(uuid(), 9, 1, "X") AS c FROM t1;
+c
+xxxxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
+xxxxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
+xxxxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
+SELECT COUNT(DISTINCT c) FROM (SELECT id, INSERT(UUID(), 9, 1, "X") AS c FROM t1) AS d1;
+COUNT(DISTINCT c)
+3
+SELECT DISTINCT INSERT(UUID(), 9, 1, "X") AS c FROM t1;
+c
+xxxxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
+xxxxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
+xxxxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
+DROP TABLE t1;
+#
# End of 5.5 tests
#
#
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index d54a70cab45..ea3f57c6204 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -571,6 +571,17 @@ AND 57813X540X1723 = 'Test';
N AVG
0 NULL
drop table t1;
+#
+# MDEV-15630 uuid() function evaluates at wrong time in query
+#
+CREATE TABLE t1 (id INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT COUNT(1), UUID() as uid FROM t1 GROUP BY uid;
+COUNT(1) uid
+1 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+1 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+1 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+DROP TABLE t1;
SELECT NAME_CONST('a', -(1 OR 2)) OR 1;
ERROR HY000: Incorrect arguments to NAME_CONST
SELECT NAME_CONST('a', -(1 AND 2)) OR 1;
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index c0bf5657aa1..519551d0c37 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -2349,11 +2349,27 @@ CREATE TABLE t1 (b1 BIT NOT NULL);
INSERT INTO t1 VALUES (0),(1);
CREATE TABLE t2 (b2 BIT NOT NULL);
INSERT INTO t2 VALUES (0),(1);
-SET SESSION JOIN_CACHE_LEVEL = 3;
+set @save_join_cache_level= @@join_cache_level;
+SET @@join_cache_level = 3;
SELECT t1.b1+'0' , t2.b2 + '0' FROM t1 LEFT JOIN t2 ON b1 = b2;
t1.b1+'0' t2.b2 + '0'
0 0
1 1
DROP TABLE t1, t2;
+set @join_cache_level= @save_join_cache_level;
+#
+# MDEV-14779: using left join causes incorrect results with materialization and derived tables
+#
+create table t1(id int);
+insert into t1 values (1),(2);
+create table t2(sid int, id int);
+insert into t2 values (1,1),(2,2);
+select * from t1 t
+left join (select * from t2 where sid in (select max(sid) from t2 where 0=1 group by id)) r
+on t.id=r.id ;
+id sid id
+1 NULL NULL
+2 NULL NULL
+drop table t1, t2;
# end of 5.5 tests
SET optimizer_switch=@save_optimizer_switch;
diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result
index 7e5f89f55b5..e50129ec1a5 100644
--- a/mysql-test/r/join_outer_jcl6.result
+++ b/mysql-test/r/join_outer_jcl6.result
@@ -2360,12 +2360,28 @@ CREATE TABLE t1 (b1 BIT NOT NULL);
INSERT INTO t1 VALUES (0),(1);
CREATE TABLE t2 (b2 BIT NOT NULL);
INSERT INTO t2 VALUES (0),(1);
-SET SESSION JOIN_CACHE_LEVEL = 3;
+set @save_join_cache_level= @@join_cache_level;
+SET @@join_cache_level = 3;
SELECT t1.b1+'0' , t2.b2 + '0' FROM t1 LEFT JOIN t2 ON b1 = b2;
t1.b1+'0' t2.b2 + '0'
0 0
1 1
DROP TABLE t1, t2;
+set @join_cache_level= @save_join_cache_level;
+#
+# MDEV-14779: using left join causes incorrect results with materialization and derived tables
+#
+create table t1(id int);
+insert into t1 values (1),(2);
+create table t2(sid int, id int);
+insert into t2 values (1,1),(2,2);
+select * from t1 t
+left join (select * from t2 where sid in (select max(sid) from t2 where 0=1 group by id)) r
+on t.id=r.id ;
+id sid id
+1 NULL NULL
+2 NULL NULL
+drop table t1, t2;
# end of 5.5 tests
SET optimizer_switch=@save_optimizer_switch;
set join_cache_level=default;
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
index e505a0d96e0..60690a43b08 100644
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
@@ -1147,8 +1147,8 @@ The following options may be given as the first argument:
--wsrep-sync-wait[=#]
Ensure "synchronous" read view before executing an
operation of the type specified by bitmask: 1 -
- READ(includes SELECT, SHOW and BEGIN/START TRANSACTION);
- 2 - UPDATE and DELETE; 4 - INSERT and REPLACE
+ READ(includes SELECT and BEGIN/START TRANSACTION); 2 -
+ UPDATE and DELETE; 4 - INSERT and REPLACE; 8 - SHOW
Variables (--variable-name=value)
allow-suspicious-udfs FALSE
diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result
index cca754da295..2affbc23c5f 100644
--- a/mysql-test/r/parser.result
+++ b/mysql-test/r/parser.result
@@ -672,3 +672,10 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
PREPARE stmt FROM 'CREATE TRIGGER tr AFTER DELETE ON t1 FOR EACH ROW SET @a = 1\\';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '\' at line 1
DROP TABLE t1;
+#
+# MDEV-15620 Crash when using "SET @@NEW.a=expr" inside a trigger
+#
+CREATE TABLE t1 (a INT);
+CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @@NEW.a=0;
+ERROR HY000: Unknown system variable 'NEW'
+DROP TABLE t1;
diff --git a/mysql-test/r/ps_qc_innodb.result b/mysql-test/r/ps_qc_innodb.result
new file mode 100644
index 00000000000..775055e858f
--- /dev/null
+++ b/mysql-test/r/ps_qc_innodb.result
@@ -0,0 +1,23 @@
+#
+# MDEV-15492: Subquery crash similar to MDEV-10050
+#
+SET @qcs.save= @@global.query_cache_size, @qct.save= @@global.query_cache_type;
+SET GLOBAL query_cache_size= 512*1024*1024, query_cache_type= ON;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+CREATE TABLE t2 (b INT) ENGINE=InnoDB;
+CREATE VIEW v AS select a from t1 join t2;
+PREPARE stmt1 FROM "SELECT * FROM t1 WHERE a in (SELECT a FROM v)";
+PREPARE stmt2 FROM "SELECT * FROM t1 WHERE a in (SELECT a FROM v)";
+EXECUTE stmt2;
+a
+EXECUTE stmt1;
+a
+INSERT INTO t2 VALUES (0);
+EXECUTE stmt1;
+a
+START TRANSACTION;
+EXECUTE stmt1;
+a
+DROP VIEW v;
+DROP TABLE t1, t2;
+SET GLOBAL query_cache_size= @qcs.save, query_cache_type= @qct.save;
diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result
index 2b9e952652e..574660f0cbb 100644
--- a/mysql-test/r/subselect4.result
+++ b/mysql-test/r/subselect4.result
@@ -1043,7 +1043,7 @@ EXPLAIN
SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT min(f3)+f3, min(f4)+f3+max(f4) FROM t2 WHERE f3 > 10);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
-2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No matching min/max row
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT min(f3)+f3, min(f4)+f3+max(f4) FROM t2 WHERE f3 > 10);
f1 f2
SET @@optimizer_switch = 'materialization=off,in_to_exists=on,semijoin=off';
@@ -1134,7 +1134,7 @@ EXPLAIN
SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT min(f3)+f3, min(f4)+f3+max(f4) FROM t2 WHERE f3 > 10);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
-2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No matching min/max row
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT min(f3)+f3, min(f4)+f3+max(f4) FROM t2 WHERE f3 > 10);
f1 f2
set @@optimizer_switch=@save_optimizer_switch;
@@ -2485,5 +2485,36 @@ FROM t2 WHERE b <= 'quux' GROUP BY field;
field COUNT(DISTINCT c)
0 1
drop table t1,t2;
+#
+# MDEV-15555: select from DUAL where false yielding wrong result when in a IN
+#
+explain
+SELECT 2 IN (SELECT 2 from DUAL WHERE 1 != 1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+SELECT 2 IN (SELECT 2 from DUAL WHERE 1 != 1);
+2 IN (SELECT 2 from DUAL WHERE 1 != 1)
+0
SET optimizer_switch= @@global.optimizer_switch;
set @@tmp_table_size= @@global.tmp_table_size;
+#
+# mfrv-14515: Wrong results for tableless query with subquery in WHERE
+# and implicit aggregation
+#
+create table t1 (i1 int, i2 int);
+insert into t1 values (1314, 1084),(1330, 1084),(1401, 1084),(580, 1084);
+create table t2 (cd int);
+insert into t2 values
+(1330), (1330), (1330), (1330), (1330), (1330), (1330), (1330),
+(1330), (1330), (1330), (1330), (1330), (1330), (1330), (1330);
+select max(10) from dual
+where exists (select 1 from t2 join t1 on t1.i1 = t2.cd and t1.i2 = 345);
+max(10)
+NULL
+insert into t2 select * from t2;
+select max(10) from dual
+where exists (select 1 from t2 join t1 on t1.i1 = t2.cd and t1.i2 = 345);
+max(10)
+NULL
+DROP TABLE t1,t2;
diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result
index db51bbb8186..ff09da022b4 100644
--- a/mysql-test/r/subselect_mat.result
+++ b/mysql-test/r/subselect_mat.result
@@ -2714,3 +2714,18 @@ a b sq
4 4 1
4 2 1
drop table t1, t2;
+#
+# MDEV-15235: Assertion `length > 0' failed in create_ref_for_key
+#
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2 (f CHAR(1));
+INSERT INTO t2 VALUES ('a'),('b');
+explain
+SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where
+2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
+SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
+f
+DROP TABLE t1, t2;
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 5a51ea85f55..4e3146052e9 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -5236,114 +5236,6 @@ execute stmt1;
deallocate prepare stmt1;
drop view v1,v2;
drop table t1,t2;
-#
-# MDEV-6251: SIGSEGV in query optimizer (in set_check_materialized
-# with MERGE view)
-#
-CREATE TABLE t1 (a1 INT(11) NOT NULL DEFAULT NULL AUTO_INCREMENT PRIMARY KEY);
-CREATE TABLE t2 (b1 INT(11) NOT NULL DEFAULT NULL AUTO_INCREMENT PRIMARY KEY);
-CREATE TABLE t3 (c1 INT(11) NOT NULL DEFAULT NULL AUTO_INCREMENT PRIMARY KEY);
-CREATE TABLE t4 (d1 INT(11) NOT NULL DEFAULT NULL AUTO_INCREMENT PRIMARY KEY);
-CREATE TABLE t5 (e1 INT(11) NOT NULL DEFAULT NULL AUTO_INCREMENT PRIMARY KEY);
-CREATE TABLE t6 (f1 INT(11) NOT NULL DEFAULT NULL AUTO_INCREMENT PRIMARY KEY);
-CREATE OR REPLACE view v1 AS
-SELECT 1
-FROM t1 a_alias_1
-LEFT JOIN (t2 b_alias_1 JOIN t1 a_alias_2) ON b_alias_1.b1 = a_alias_1.a1 AND a_alias_2.a1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_1 ON c_alias_1.c1 = a_alias_1.a1
-LEFT JOIN t4 d_alias_1 ON d_alias_1.d1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_2 ON c_alias_2.c1 = a_alias_1.a1
-LEFT JOIN t5 e_alias_1 ON e_alias_1.e1 = a_alias_1.a1
-LEFT JOIN t6 f_alias_1 ON f_alias_1.f1 = a_alias_1.a1
-;
-SELECT 1
-FROM (( SELECT 1
-FROM t1 a_alias_1
-LEFT JOIN (t2 b_alias_1 JOIN t1 a_alias_2) ON b_alias_1.b1 = a_alias_1.a1 AND a_alias_2.a1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_1 ON c_alias_1.c1 = a_alias_1.a1
-LEFT JOIN t4 d_alias_1 ON d_alias_1.d1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_2 ON c_alias_2.c1 = a_alias_1.a1
-LEFT JOIN t5 e_alias_1 ON e_alias_1.e1 = a_alias_1.a1
-LEFT JOIN t6 f_alias_1 ON f_alias_1.f1 = a_alias_1.a1
-) t1)
-LEFT OUTER JOIN (( SELECT 1
-FROM t1 a_alias_1
-LEFT JOIN (t2 b_alias_1 JOIN t1 a_alias_2) ON b_alias_1.b1 = a_alias_1.a1 AND a_alias_2.a1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_1 ON c_alias_1.c1 = a_alias_1.a1
-LEFT JOIN t4 d_alias_1 ON d_alias_1.d1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_2 ON c_alias_2.c1 = a_alias_1.a1
-LEFT JOIN t5 e_alias_1 ON e_alias_1.e1 = a_alias_1.a1
-LEFT JOIN t6 f_alias_1 ON f_alias_1.f1 = a_alias_1.a1
-) t2) ON 1=1
-LEFT OUTER JOIN (( SELECT 1
-FROM t1 a_alias_1
-LEFT JOIN (t2 b_alias_1 JOIN t1 a_alias_2) ON b_alias_1.b1 = a_alias_1.a1 AND a_alias_2.a1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_1 ON c_alias_1.c1 = a_alias_1.a1
-LEFT JOIN t4 d_alias_1 ON d_alias_1.d1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_2 ON c_alias_2.c1 = a_alias_1.a1
-LEFT JOIN t5 e_alias_1 ON e_alias_1.e1 = a_alias_1.a1
-LEFT JOIN t6 f_alias_1 ON f_alias_1.f1 = a_alias_1.a1
-) t3) ON 1=1
-LEFT OUTER JOIN (( SELECT 1
-FROM t1 a_alias_1
-LEFT JOIN (t2 b_alias_1 JOIN t1 a_alias_2) ON b_alias_1.b1 = a_alias_1.a1 AND a_alias_2.a1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_1 ON c_alias_1.c1 = a_alias_1.a1
-LEFT JOIN t4 d_alias_1 ON d_alias_1.d1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_2 ON c_alias_2.c1 = a_alias_1.a1
-LEFT JOIN t5 e_alias_1 ON e_alias_1.e1 = a_alias_1.a1
-LEFT JOIN t6 f_alias_1 ON f_alias_1.f1 = a_alias_1.a1
-) t4) ON 1=1
-LEFT OUTER JOIN (( SELECT 1
-FROM t1 a_alias_1
-LEFT JOIN (t2 b_alias_1 JOIN t1 a_alias_2) ON b_alias_1.b1 = a_alias_1.a1 AND a_alias_2.a1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_1 ON c_alias_1.c1 = a_alias_1.a1
-LEFT JOIN t4 d_alias_1 ON d_alias_1.d1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_2 ON c_alias_2.c1 = a_alias_1.a1
-LEFT JOIN t5 e_alias_1 ON e_alias_1.e1 = a_alias_1.a1
-LEFT JOIN t6 f_alias_1 ON f_alias_1.f1 = a_alias_1.a1
-) t5) ON 1=1
-LEFT OUTER JOIN (( SELECT 1
-FROM t1 a_alias_1
-LEFT JOIN (t2 b_alias_1 JOIN t1 a_alias_2) ON b_alias_1.b1 = a_alias_1.a1 AND a_alias_2.a1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_1 ON c_alias_1.c1 = a_alias_1.a1
-LEFT JOIN t4 d_alias_1 ON d_alias_1.d1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_2 ON c_alias_2.c1 = a_alias_1.a1
-LEFT JOIN t5 e_alias_1 ON e_alias_1.e1 = a_alias_1.a1
-LEFT JOIN t6 f_alias_1 ON f_alias_1.f1 = a_alias_1.a1
-) t6) ON 1=1
-LEFT OUTER JOIN (( SELECT 1
-FROM t1 a_alias_1
-LEFT JOIN (t2 b_alias_1 JOIN t1 a_alias_2) ON b_alias_1.b1 = a_alias_1.a1 AND a_alias_2.a1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_1 ON c_alias_1.c1 = a_alias_1.a1
-LEFT JOIN t4 d_alias_1 ON d_alias_1.d1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_2 ON c_alias_2.c1 = a_alias_1.a1
-LEFT JOIN t5 e_alias_1 ON e_alias_1.e1 = a_alias_1.a1
-LEFT JOIN t6 f_alias_1 ON f_alias_1.f1 = a_alias_1.a1
-) t7) ON 1=1
-LEFT OUTER JOIN (( SELECT 1
-FROM t1 a_alias_1
-LEFT JOIN (t2 b_alias_1 JOIN t1 a_alias_2) ON b_alias_1.b1 = a_alias_1.a1 AND a_alias_2.a1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_1 ON c_alias_1.c1 = a_alias_1.a1
-LEFT JOIN t4 d_alias_1 ON d_alias_1.d1 = a_alias_1.a1
-LEFT JOIN t3 c_alias_2 ON c_alias_2.c1 = a_alias_1.a1
-LEFT JOIN t5 e_alias_1 ON e_alias_1.e1 = a_alias_1.a1
-LEFT JOIN t6 f_alias_1 ON f_alias_1.f1 = a_alias_1.a1
-) t8) ON 1=1
-;
-1
-SELECT 1
-FROM (v1 t1)
-LEFT OUTER JOIN (v1 t2) ON 1=1
-LEFT OUTER JOIN (v1 t3) ON 1=1
-LEFT OUTER JOIN (v1 t4) ON 1=1
-LEFT OUTER JOIN (v1 t5) ON 1=1
-LEFT OUTER JOIN (v1 t6) ON 1=1
-LEFT OUTER JOIN (v1 t7) ON 1=1
-LEFT OUTER JOIN (v1 t8) ON 1=1
-;
-1
-drop view v1;
-drop table t1,t2,t3,t4,t5,t6;
# -----------------------------------------------------------------
# -- End of 5.3 tests.
# -----------------------------------------------------------------
@@ -5644,6 +5536,203 @@ View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select group_concat(`t1`.`str` separator '\\') AS `GROUP_CONCAT(str SEPARATOR '\\')` from `t1` latin1 latin1_swedish_ci
drop view v1;
drop table t1;
+CREATE TABLE IF NOT EXISTS t0 (f0 INT);
+CREATE TABLE IF NOT EXISTS t1 (f1 INT);
+CREATE TABLE IF NOT EXISTS t2 (f2 INT);
+CREATE TABLE IF NOT EXISTS t3 (f3 INT);
+CREATE TABLE IF NOT EXISTS t4 (f4 INT);
+CREATE TABLE IF NOT EXISTS t5 (f5 INT);
+CREATE TABLE IF NOT EXISTS t6 (f6 INT);
+CREATE TABLE IF NOT EXISTS t7 (f7 INT);
+CREATE TABLE IF NOT EXISTS t8 (f8 INT);
+CREATE TABLE IF NOT EXISTS t9 (f9 INT);
+CREATE TABLE IF NOT EXISTS t10 (f10 INT);
+CREATE TABLE IF NOT EXISTS t11 (f11 INT);
+CREATE TABLE IF NOT EXISTS t12 (f12 INT);
+CREATE TABLE IF NOT EXISTS t13 (f13 INT);
+CREATE TABLE IF NOT EXISTS t14 (f14 INT);
+CREATE TABLE IF NOT EXISTS t15 (f15 INT);
+CREATE TABLE IF NOT EXISTS t16 (f16 INT);
+CREATE TABLE IF NOT EXISTS t17 (f17 INT);
+CREATE TABLE IF NOT EXISTS t18 (f18 INT);
+CREATE TABLE IF NOT EXISTS t19 (f19 INT);
+CREATE TABLE IF NOT EXISTS t20 (f20 INT);
+CREATE TABLE IF NOT EXISTS t21 (f21 INT);
+CREATE TABLE IF NOT EXISTS t22 (f22 INT);
+CREATE TABLE IF NOT EXISTS t23 (f23 INT);
+CREATE TABLE IF NOT EXISTS t24 (f24 INT);
+CREATE TABLE IF NOT EXISTS t25 (f25 INT);
+CREATE TABLE IF NOT EXISTS t26 (f26 INT);
+CREATE TABLE IF NOT EXISTS t27 (f27 INT);
+CREATE TABLE IF NOT EXISTS t28 (f28 INT);
+CREATE TABLE IF NOT EXISTS t29 (f29 INT);
+CREATE TABLE IF NOT EXISTS t30 (f30 INT);
+CREATE TABLE IF NOT EXISTS t31 (f31 INT);
+CREATE TABLE IF NOT EXISTS t32 (f32 INT);
+CREATE TABLE IF NOT EXISTS t33 (f33 INT);
+CREATE TABLE IF NOT EXISTS t34 (f34 INT);
+CREATE TABLE IF NOT EXISTS t35 (f35 INT);
+CREATE TABLE IF NOT EXISTS t36 (f36 INT);
+CREATE TABLE IF NOT EXISTS t37 (f37 INT);
+CREATE TABLE IF NOT EXISTS t38 (f38 INT);
+CREATE TABLE IF NOT EXISTS t39 (f39 INT);
+CREATE TABLE IF NOT EXISTS t40 (f40 INT);
+CREATE TABLE IF NOT EXISTS t41 (f41 INT);
+CREATE TABLE IF NOT EXISTS t42 (f42 INT);
+CREATE TABLE IF NOT EXISTS t43 (f43 INT);
+CREATE TABLE IF NOT EXISTS t44 (f44 INT);
+CREATE TABLE IF NOT EXISTS t45 (f45 INT);
+CREATE TABLE IF NOT EXISTS t46 (f46 INT);
+CREATE TABLE IF NOT EXISTS t47 (f47 INT);
+CREATE TABLE IF NOT EXISTS t48 (f48 INT);
+CREATE TABLE IF NOT EXISTS t49 (f49 INT);
+CREATE TABLE IF NOT EXISTS t50 (f50 INT);
+CREATE TABLE IF NOT EXISTS t51 (f51 INT);
+CREATE TABLE IF NOT EXISTS t52 (f52 INT);
+CREATE TABLE IF NOT EXISTS t53 (f53 INT);
+CREATE TABLE IF NOT EXISTS t54 (f54 INT);
+CREATE TABLE IF NOT EXISTS t55 (f55 INT);
+CREATE TABLE IF NOT EXISTS t56 (f56 INT);
+CREATE TABLE IF NOT EXISTS t57 (f57 INT);
+CREATE TABLE IF NOT EXISTS t58 (f58 INT);
+CREATE TABLE IF NOT EXISTS t59 (f59 INT);
+CREATE TABLE IF NOT EXISTS t60 (f60 INT);
+CREATE OR REPLACE VIEW v60 AS SELECT * FROM t60;
+EXPLAIN
+SELECT t0.*
+FROM t0
+JOIN t1
+ON t1.f1 = t0.f0
+LEFT JOIN t2
+ON t0.f0 = t2.f2
+LEFT JOIN t3
+ON t0.f0 = t3.f3
+LEFT JOIN t4
+ON t0.f0 = t4.f4
+LEFT JOIN t5
+ON t4.f4 = t5.f5
+LEFT JOIN t6
+ON t0.f0 = t6.f6
+LEFT JOIN t7
+ON t0.f0 = t7.f7
+LEFT JOIN t8
+ON t0.f0 = t8.f8
+LEFT JOIN t9
+ON t0.f0 = t9.f9
+LEFT JOIN t10
+ON t0.f0 = t10.f10
+LEFT JOIN t11
+ON t0.f0 = t11.f11
+LEFT JOIN t12
+ON t0.f0 = t12.f12
+LEFT JOIN t13
+ON t0.f0 = t13.f13
+LEFT JOIN t14
+ON t0.f0 = t14.f14
+LEFT JOIN t15
+ON t0.f0 = t15.f15
+LEFT JOIN t16
+ON t0.f0 = t16.f16
+LEFT JOIN t17
+ON t0.f0 = t17.f17
+LEFT JOIN t18
+ON t0.f0 = t18.f18
+LEFT JOIN t19
+ON t18.f18 = t19.f19
+LEFT JOIN t20
+ON t20.f20 = t19.f19
+LEFT JOIN t21
+ON t20.f20 = t21.f21
+LEFT JOIN t22
+ON t19.f19 = t22.f22
+LEFT JOIN t23
+ON t23.f23 = t0.f0
+LEFT JOIN t24
+ON t24.f24 = t23.f23
+LEFT JOIN t25
+ON t0.f0 = t25.f25
+LEFT JOIN t26
+ON t26.f26 = t0.f0
+LEFT JOIN t27
+ON t27.f27 = t0.f0
+LEFT JOIN t28
+ON t0.f0 = t28.f28
+LEFT JOIN t29
+ON t0.f0 = t29.f29
+LEFT JOIN t30
+ON t30.f30 = t0.f0
+LEFT JOIN t31
+ON t0.f0 = t31.f31
+LEFT JOIN t32
+ON t32.f32 = t31.f31
+LEFT JOIN t33
+ON t33.f33 = t0.f0
+LEFT JOIN t34
+ON t33.f33 = t34.f34
+LEFT JOIN t35
+ON t33.f33 = t35.f35
+LEFT JOIN t36
+ON t36.f36 = t0.f0
+LEFT JOIN t37
+ON t32.f32 = t37.f37
+LEFT JOIN t38
+ON t31.f31 = t38.f38
+LEFT JOIN t39
+ON t39.f39 = t0.f0
+LEFT JOIN t40
+ON t40.f40 = t39.f39
+LEFT JOIN t41
+ON t41.f41 = t0.f0
+LEFT JOIN t42
+ON t42.f42 = t41.f41
+LEFT JOIN t43
+ON t43.f43 = t41.f41
+LEFT JOIN t44
+ON t44.f44 = t0.f0
+LEFT JOIN t45
+ON t45.f45 = t0.f0
+LEFT JOIN t46
+ON t46.f46 = t0.f0
+LEFT JOIN t47
+ON t47.f47 = t0.f0
+LEFT JOIN t48
+ON t48.f48 = t0.f0
+LEFT JOIN t49
+ON t0.f0 = t49.f49
+LEFT JOIN t50
+ON t0.f0 = t50.f50
+LEFT JOIN t51
+ON t0.f0 = t51.f51
+LEFT JOIN t52
+ON t52.f52 = t0.f0
+LEFT JOIN t53
+ON t53.f53 = t0.f0
+LEFT JOIN t54
+ON t54.f54 = t0.f0
+LEFT JOIN t55
+ON t55.f55 = t0.f0
+LEFT JOIN t56
+ON t56.f56 = t0.f0
+LEFT JOIN t57
+ON t57.f57 = t0.f0
+LEFT JOIN t58
+ON t58.f58 = t57.f57
+LEFT JOIN t59
+ON t36.f36 = t59.f59
+LEFT JOIN v60
+ON t36.f36 = v60.f60
+;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
+drop table t0, t1, t2, t3, t4, t5, t6, t7, t8, t9,
+t10, t11, t12, t13, t14, t15, t16, t17, t18,
+t19, t20, t21, t22, t23, t24, t25, t26, t27,
+t28, t29, t30, t31, t32, t33, t34, t35, t36,
+t37, t38, t39, t40, t41, t42, t43, t44, t45,
+t46, t47, t48, t49, t50, t51, t52, t53, t54,
+t55, t56, t57, t58, t59,t60;
+drop view v60;
# -----------------------------------------------------------------
# -- End of 5.5 tests.
# -----------------------------------------------------------------