From a6ebe74e3c8c09253029bac4ead4b3f72f816409 Mon Sep 17 00:00:00 2001 From: "serg@serg.mysql.com" <> Date: Sat, 7 Apr 2001 00:18:33 +0200 Subject: Preliminary commit of HANDLER syntax (w/o LIMIT or column-list) --- mysql-test/t/handler.test | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 mysql-test/t/handler.test (limited to 'mysql-test/t/handler.test') diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test new file mode 100644 index 00000000000..18f1d37fee4 --- /dev/null +++ b/mysql-test/t/handler.test @@ -0,0 +1,32 @@ +# +# test of HANDLER ... +# + +drop table if exists t1; +create table t1 (a int, b char(10), key a(a)); +insert into t1 values +(14,"aaa"),(15,"bbb"),(16,"ccc"), +(17,"ddd"),(18,"eee"),(19,"fff"), +(20,"ggg"),(21,"hhh"),(22,"iii"); +handler t1 open; +handler t1 read a first; +handler t1 read a next; +handler t1 read a next; +handler t1 read a prev; +handler t1 read a last; +handler t1 read a prev; +handler t1 read a prev; + +handler t1 read a first; +handler t1 read a prev; + +handler t1 read a last; +handler t1 read a prev; +handler t1 read a next; +handler t1 read a next; + +handler t1 read a=(15); + +handler t1 close; +drop table if exists t1; + -- cgit v1.2.1 From 28750d031a79f5fa7b34f27ba3b248ea68f36fd0 Mon Sep 17 00:00:00 2001 From: "serg@serg.mysql.com" <> Date: Sun, 8 Apr 2001 12:56:12 +0200 Subject: This wouldn't ever be pushed --- mysql-test/t/handler.test | 65 ++++++++++++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 24 deletions(-) (limited to 'mysql-test/t/handler.test') diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test index 18f1d37fee4..a84a574aa29 100644 --- a/mysql-test/t/handler.test +++ b/mysql-test/t/handler.test @@ -3,30 +3,47 @@ # drop table if exists t1; -create table t1 (a int, b char(10), key a(a)); +create table t1 (a int, b char(10), key a(a), key b(a,b)); insert into t1 values -(14,"aaa"),(15,"bbb"),(16,"ccc"), -(17,"ddd"),(18,"eee"),(19,"fff"), +(14,"aaa"),(15,"bbb"),(16,"ccc"),(16,"xxx"), +(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"), (20,"ggg"),(21,"hhh"),(22,"iii"); -handler t1 open; -handler t1 read a first; -handler t1 read a next; -handler t1 read a next; -handler t1 read a prev; -handler t1 read a last; -handler t1 read a prev; -handler t1 read a prev; - -handler t1 read a first; -handler t1 read a prev; - -handler t1 read a last; -handler t1 read a prev; -handler t1 read a next; -handler t1 read a next; - -handler t1 read a=(15); - -handler t1 close; -drop table if exists t1; +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 close; +drop table if exists t1; -- cgit v1.2.1 From a981cfbdcb534675cc4cf92fd583826d746e68c8 Mon Sep 17 00:00:00 2001 From: "serg@serg.mysql.com" <> Date: Mon, 9 Apr 2001 15:37:19 +0200 Subject: This won't be pushed either --- mysql-test/t/handler.test | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysql-test/t/handler.test') diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test index a84a574aa29..9656a28abe0 100644 --- a/mysql-test/t/handler.test +++ b/mysql-test/t/handler.test @@ -45,5 +45,12 @@ 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 last limit 3; + handler t2 close; drop table if exists t1; -- cgit v1.2.1 From ca0ba8e0ab4c765178d7dc3e703e70919f83bfa1 Mon Sep 17 00:00:00 2001 From: "serg@serg.mysql.com" <> Date: Fri, 13 Apr 2001 16:18:44 +0200 Subject: this won't be pushed --- mysql-test/t/handler.test | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mysql-test/t/handler.test') diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test index 9656a28abe0..a22e5546252 100644 --- a/mysql-test/t/handler.test +++ b/mysql-test/t/handler.test @@ -5,8 +5,8 @@ drop table if exists t1; create table t1 (a int, b char(10), key a(a), key b(a,b)); insert into t1 values -(14,"aaa"),(15,"bbb"),(16,"ccc"),(16,"xxx"), (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; @@ -50,7 +50,16 @@ 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; -- cgit v1.2.1