summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-01-02 21:57:22 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-01-02 21:57:22 +0200
commit016caa3d202ee1f020ff84613b345c8f3bacdce3 (patch)
tree0d146b64709becc47a89359615555ae16102fede /mysql-test/t
parent7e4c185c774cabaa1912760e143d9385ce959eea (diff)
parent51e4650ed0644ed88cf5d542bd0cab50e7ea0343 (diff)
downloadmariadb-git-016caa3d202ee1f020ff84613b345c8f3bacdce3.tar.gz
Merge 10.0 into 10.1
Diffstat (limited to 'mysql-test/t')
-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 6eed931276c..f7008f570b8 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -3860,4 +3860,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