summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp.result
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-09-18 13:07:31 +0200
committerSergei Golubchik <sergii@pisem.net>2013-09-18 13:07:31 +0200
commit4ec2e9d7eda78d409d1b017ef4d8928fe9055438 (patch)
tree6c3a74a740d3c1c5f3a7d1f8154d8a791b435b3f /mysql-test/r/sp.result
parent1a2a9d74fe1256554eceb09bbc6752a6376df87d (diff)
parent197bdbae4db78ba65f3668803bebd3c4a4509ae5 (diff)
downloadmariadb-git-4ec2e9d7eda78d409d1b017ef4d8928fe9055438.tar.gz
5.5 merge and fixes for compiler/test errors
Diffstat (limited to 'mysql-test/r/sp.result')
-rw-r--r--mysql-test/r/sp.result39
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 6e6f05667ed..d17f8c3fbb1 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -7977,4 +7977,43 @@ Warning 1329 No data - zero rows fetched, selected, or processed
drop procedure p1;
drop procedure p2;
drop table t1;
+#
+# MDEV-4978 - Server cursor is broken with blobs in the select list,
+# ORDER BY does not work
+#
+CREATE TABLE t1(a INT, b BLOB);
+INSERT INTO t1 VALUES(1,REPEAT('a',4835)),(2,'b'),(3,'c'),(4,'d'),(5,REPEAT('e',805)),(6,'f');
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE done INT DEFAULT 0;
+DECLARE v1 INT;
+DECLARE v2 BLOB;
+DECLARE c1 CURSOR FOR SELECT * FROM t1 ORDER BY a;
+DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done=1;
+OPEN c1;
+REPEAT
+FETCH c1 INTO v1, v2;
+IF NOT done THEN
+SELECT v1;
+END IF;
+UNTIL done END REPEAT;
+CLOSE c1;
+END|
+CALL p1;
+v1
+1
+v1
+2
+v1
+3
+v1
+4
+v1
+5
+v1
+6
+Warnings:
+Error 1329 No data - zero rows fetched, selected, or processed
+DROP PROCEDURE p1;
+DROP TABLE t1;
# End of 5.5 test