summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp-innodb.result
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2020-01-11 18:34:57 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2020-01-11 18:34:57 +0100
commit54449161f8fa953af493f4785305b14fe89af104 (patch)
tree567293d9dc3539e2857e823e6f1775f1ea83ba25 /mysql-test/r/sp-innodb.result
parent98f70fa26bc94991767f6c2008dac3fccf14d23c (diff)
parentcb204e11eaf4c473ce5d5a10a21de147430057dc (diff)
downloadmariadb-git-54449161f8fa953af493f4785305b14fe89af104.tar.gz
Merge with last MariaDB version
Diffstat (limited to 'mysql-test/r/sp-innodb.result')
-rw-r--r--mysql-test/r/sp-innodb.result34
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/r/sp-innodb.result b/mysql-test/r/sp-innodb.result
index b3405705698..8dee74040b3 100644
--- a/mysql-test/r/sp-innodb.result
+++ b/mysql-test/r/sp-innodb.result
@@ -130,3 +130,37 @@ SET @@innodb_lock_wait_timeout= @innodb_lock_wait_timeout_saved;
#
# BUG 16041903: End of test case
#
+#
+# MDEV-15035: SP using query with outer join and a parameter
+# in ON expression
+#
+CREATE TABLE t1 (
+id int NOT NULL,
+PRIMARY KEY (id)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1), (2);
+CREATE TABLE t2 (
+id int NOT NULL,
+id_foo int NOT NULL,
+PRIMARY KEY (id)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1, 1);
+DROP PROCEDURE IF EXISTS test_proc;
+CREATE PROCEDURE test_proc(IN param int)
+LANGUAGE SQL
+READS SQL DATA
+BEGIN
+SELECT DISTINCT f.id
+FROM t1 f
+LEFT OUTER JOIN t2 b ON b.id_foo = f.id
+WHERE (param <> 0 OR b.id IS NOT NULL);
+END|
+CALL test_proc(0);
+id
+1
+CALL test_proc(1);
+id
+1
+2
+DROP PROCEDURE IF EXISTS test_proc;
+DROP TABLE t1, t2;