summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp.result
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-08-22 16:13:54 +0200
committerSergei Golubchik <sergii@pisem.net>2012-08-22 16:13:54 +0200
commit1fd8150a5b5e3f56aa3c253225929a07ee9a4026 (patch)
tree6fb814b28d2a0b8227b7a9f835f2b888c2a2596f /mysql-test/r/sp.result
parent60561ae6133cf40f4fc445e1d6e8f395a20b2573 (diff)
parent115a2967563d3ac734ce371260098710ba42cdf0 (diff)
downloadmariadb-git-1fd8150a5b5e3f56aa3c253225929a07ee9a4026.tar.gz
5.1 merge
increase xtradb verson from 13.0 to 13.01
Diffstat (limited to 'mysql-test/r/sp.result')
-rw-r--r--mysql-test/r/sp.result38
1 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index c425cad0553..adb783ee243 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -7109,3 +7109,41 @@ DROP FUNCTION f1;
# ------------------------------------------------------------------
# -- End of 5.1 tests
# ------------------------------------------------------------------
+
+# Bug#13805127: Stored program cache produces wrong result in same THD
+
+CREATE PROCEDURE p1(x INT UNSIGNED)
+BEGIN
+SELECT c1, t2.c2, count(c3)
+FROM
+(
+SELECT 3 as c2 FROM dual WHERE x = 1
+UNION
+SELECT 2 FROM dual WHERE x = 1 OR x = 2
+) AS t1,
+(
+SELECT '2012-03-01 01:00:00' AS c1, 3 as c2, 1 as c3 FROM dual
+UNION
+SELECT '2012-03-01 02:00:00', 3, 2 FROM dual
+UNION
+SELECT '2012-03-01 01:00:00', 2, 1 FROM dual
+) AS t2
+WHERE t2.c2 = t1.c2
+GROUP BY c1, c2
+;
+END|
+
+CALL p1(1);
+c1 c2 count(c3)
+2012-03-01 01:00:00 2 1
+2012-03-01 01:00:00 3 1
+2012-03-01 02:00:00 3 1
+CALL p1(2);
+c1 c2 count(c3)
+2012-03-01 01:00:00 2 1
+CALL p1(1);
+c1 c2 count(c3)
+2012-03-01 01:00:00 2 1
+2012-03-01 01:00:00 3 1
+2012-03-01 02:00:00 3 1
+DROP PROCEDURE p1;