summaryrefslogtreecommitdiff
path: root/mysql-test/t/handler.test
diff options
context:
space:
mode:
authorserg@serg.mysql.com <>2001-04-13 21:29:06 +0200
committerserg@serg.mysql.com <>2001-04-13 21:29:06 +0200
commit6a41e1f3a5a4fbe08e4e5743060a62964b8f6f40 (patch)
treeae2d8790dbf1ae24cc87a52f4f3aa16bbb1d8158 /mysql-test/t/handler.test
parentf48ed453035bc01af7ab26a662e1d9b96758a00d (diff)
parentca0ba8e0ab4c765178d7dc3e703e70919f83bfa1 (diff)
downloadmariadb-git-6a41e1f3a5a4fbe08e4e5743060a62964b8f6f40.tar.gz
merged
Diffstat (limited to 'mysql-test/t/handler.test')
-rw-r--r--mysql-test/t/handler.test65
1 files changed, 65 insertions, 0 deletions
diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test
new file mode 100644
index 00000000000..a22e5546252
--- /dev/null
+++ b/mysql-test/t/handler.test
@@ -0,0 +1,65 @@
+#
+# test of HANDLER ...
+#
+
+drop table if exists t1;
+create table t1 (a int, b char(10), key a(a), key b(a,b));
+insert into t1 values
+(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"),
+(14,"aaa"),(15,"bbb"),(16,"ccc"),(16,"xxx"),
+(20,"ggg"),(21,"hhh"),(22,"iii");
+handler t1 open as t2;
+handler t2 read a first;
+handler t2 read a next;
+handler t2 read a next;
+handler t2 read a prev;
+handler t2 read a last;
+handler t2 read a prev;
+handler t2 read a prev;
+
+handler t2 read a first;
+handler t2 read a prev;
+
+handler t2 read a last;
+handler t2 read a prev;
+handler t2 read a next;
+handler t2 read a next;
+
+handler t2 read a=(15);
+handler t2 read a=(16);
+
+!$1070 handler t2 read a=(19,"fff");
+
+handler t2 read b=(19,"fff");
+handler t2 read b=(19,"yyy");
+handler t2 read b=(19);
+
+!$1109 handler t1 read a last;
+
+handler t2 read a=(11);
+handler t2 read a>=(11);
+
+handler t2 read a=(18);
+handler t2 read a>=(18);
+handler t2 read a>(18);
+handler t2 read a<=(18);
+handler t2 read a<(18);
+
+handler t2 read a first limit 5;
+handler t2 read a next limit 3;
+handler t2 read a prev limit 10;
+
+handler t2 read a>=(16) limit 4;
+handler t2 read a>=(16) limit 2,2;
+handler t2 read a last limit 3;
+
+handler t2 read a=(19);
+handler t2 read a=(19) where b="yyy";
+
+handler t2 read first;
+handler t2 read next;
+handler t2 read next;
+handler t2 read last;
+
+handler t2 close;
+drop table if exists t1;