summaryrefslogtreecommitdiff
path: root/mysql-test/main/ps.result
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-06-01 11:39:38 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-06-01 11:39:38 +0300
commita722ee88f33296eee6a72855570677c48dce7ebf (patch)
tree128ce4696a80fd953836b4a9eed20ab8afc4e61c /mysql-test/main/ps.result
parent5727d56260e66d9b9f2dee6783385c5928d4f3a3 (diff)
parent9c7a456a92262bdb44b85a05aa9f87369c5b063c (diff)
downloadmariadb-git-a722ee88f33296eee6a72855570677c48dce7ebf.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'mysql-test/main/ps.result')
-rw-r--r--mysql-test/main/ps.result18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/main/ps.result b/mysql-test/main/ps.result
index fd9fd7fff1c..c1334b0b9a7 100644
--- a/mysql-test/main/ps.result
+++ b/mysql-test/main/ps.result
@@ -5551,6 +5551,24 @@ Note 1003 /* select#1 */ select (/* select#2 */ select 1 from `test`.`t2` where
DEALLOCATE PREPARE stmt;
DROP TABLE t1, t2;
#
+# MDEV-25576: The statement EXPLAIN running as regular statement and
+# as prepared statement produces different results for
+# UPDATE with subquery
+#
+CREATE TABLE t1 (c1 INT KEY) ENGINE=MyISAM;
+CREATE TABLE t2 (c2 INT) ENGINE=MyISAM;
+CREATE TABLE t3 (c3 INT) ENGINE=MyISAM;
+EXPLAIN EXTENDED UPDATE t3 SET c3 = ( SELECT COUNT(d1.c1) FROM ( SELECT a11.c1 FROM t1 AS a11 STRAIGHT_JOIN t2 AS a21 ON a21.c2 = a11.c1 JOIN t1 AS a12 ON a12.c1 = a11.c1 ) d1 );
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 0 100.00
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+PREPARE stmt FROM "EXPLAIN EXTENDED UPDATE t3 SET c3 = ( SELECT COUNT(d1.c1) FROM ( SELECT a11.c1 FROM t1 AS a11 STRAIGHT_JOIN t2 AS a21 ON a21.c2 = a11.c1 JOIN t1 AS a12 ON a12.c1 = a11.c1 ) d1 )";
+EXECUTE stmt;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t3 ALL NULL NULL NULL NULL 0 100.00
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1, t2, t3;
# End of 10.2 tests
#
#