summaryrefslogtreecommitdiff
path: root/mysql-test/t/ps.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-01-02 21:52:46 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-01-02 21:52:46 +0200
commit51e4650ed0644ed88cf5d542bd0cab50e7ea0343 (patch)
treeaaf73f6a77c6c1ad03473f4d664356b6f60169c9 /mysql-test/t/ps.test
parenteef2bc5a5c30eef43eee035e23b87286a8dd50bd (diff)
parent20fab71b144f85be9e2ccc145d24d257b0e9df7e (diff)
downloadmariadb-git-51e4650ed0644ed88cf5d542bd0cab50e7ea0343.tar.gz
Merge 5.5 into 10.0
Diffstat (limited to 'mysql-test/t/ps.test')
-rw-r--r--mysql-test/t/ps.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index 675d0b5e58d..d60edf4f6a0 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -3843,4 +3843,19 @@ deallocate prepare stmt;
drop view v1,v2,v3;
drop table t1,t2,t3;
+--echo #
+--echo # MDEV-10657: incorrect result returned with binary protocol
+--echo # (prepared statements)
+--echo #
+
+create table t1 (code varchar(10) primary key);
+INSERT INTO t1(code) VALUES ('LINE1'), ('LINE2'), ('LINE3');
+SELECT X.*
+FROM
+ (SELECT CODE, RN
+ FROM
+ (SELECT A.CODE, @cnt := @cnt + 1 AS RN
+ FROM t1 A, (SELECT @cnt := 0) C) T
+ ) X;
+drop table t1;
--echo # End of 5.5 tests