summaryrefslogtreecommitdiff
path: root/mysql-test/t/win.test
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2015-06-25 08:33:15 +0300
committerVicentiu Ciorbaru <vicentiu@mariadb.org>2015-07-13 16:01:25 +0000
commitc64a3e9290db188c649f4c857352dcb34821d9f1 (patch)
tree28130ad44d06071bc8a4a3d73ff09b128d8cf752 /mysql-test/t/win.test
parent33745a407b3557f2914ebf8119e8ea3435481cde (diff)
downloadmariadb-git-10.1-window.tar.gz
Initial window func attempt10.1-window
Diffstat (limited to 'mysql-test/t/win.test')
-rw-r--r--mysql-test/t/win.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/win.test b/mysql-test/t/win.test
new file mode 100644
index 00000000000..1276eddca3d
--- /dev/null
+++ b/mysql-test/t/win.test
@@ -0,0 +1,18 @@
+create table t1(a int, b int, x char(32));
+insert into t1 values (2, 10, 'xx');
+insert into t1 values (2, 10, 'zz');
+insert into t1 values (2, 20, 'yy');
+insert into t1 values (3, 10, 'xxx');
+insert into t1 values (3, 20, 'vvv');
+# Uncommenting this line causes a crash in setup_group when executing the second
+# select.
+#select row_number() over (order by b) from t1;
+select a, b, x, row_number() over (partition by a,b order by x),
+ row_number() over (partition by a),
+ row_number() over (partition by a order by x)
+
+from t1;
+# Uncommenting this line causes a crash in filesort during init_for_filesort.
+#select a, b, x, row_number() over (partition by a order by x) from t1;
+
+drop table t1;