diff options
author | unknown <serg@serg.mysql.com> | 2002-08-21 21:01:31 +0000 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2002-08-21 21:01:31 +0000 |
commit | f93132aff42eb6633f7379329c34023b6a838e7f (patch) | |
tree | 9bdff22ec6bb1b8041a59b9fa17860501d25ad84 /mysql-test | |
parent | c53c7ff244a44173ce13c46383a2926055d5c49e (diff) | |
parent | 3f93edfa141c28e479781a5c0fa6c59150dc6369 (diff) | |
download | mariadb-git-f93132aff42eb6633f7379329c34023b6a838e7f.tar.gz |
Merge work:/home/bk/mysql-4.0
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.0
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/innodb.result | 6 | ||||
-rw-r--r-- | mysql-test/r/innodb_handler.result | 139 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 8 | ||||
-rw-r--r-- | mysql-test/t/innodb_handler.test | 69 |
4 files changed, 209 insertions, 13 deletions
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index db6b55e1a2a..c9ae4170238 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -920,12 +920,6 @@ create table t1 (t int not null default 1, key (t)) type=innodb; desc t1; Field Type Null Key Default Extra t int(11) MUL 1 -handler t1 open t1; -Table handler for 't1' doesn't have this option -handler t1 read t first; -Unknown table 't1' in HANDLER -handler t1 close; -Unknown table 't1' in HANDLER drop table t1; CREATE TABLE t1 ( number bigint(20) NOT NULL default '0', diff --git a/mysql-test/r/innodb_handler.result b/mysql-test/r/innodb_handler.result new file mode 100644 index 00000000000..73368c932af --- /dev/null +++ b/mysql-test/r/innodb_handler.result @@ -0,0 +1,139 @@ +drop table if exists t1; +create table t1 (a int, b char(10), key a(a), key b(a,b)) type=innodb; +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; +a b +14 aaa +handler t2 read a next; +a b +15 bbb +handler t2 read a next; +a b +16 ccc +handler t2 read a prev; +a b +15 bbb +handler t2 read a last; +a b +22 iii +handler t2 read a prev; +a b +21 hhh +handler t2 read a prev; +a b +20 ggg +handler t2 read a first; +a b +14 aaa +handler t2 read a prev; +a b +handler t2 read a last; +a b +22 iii +handler t2 read a prev; +a b +21 hhh +handler t2 read a next; +a b +22 iii +handler t2 read a next; +a b +handler t2 read a=(15); +a b +15 bbb +handler t2 read a=(16); +a b +16 ccc +handler t2 read a=(19,"fff"); +Too many key parts specified. Max 1 parts allowed +handler t2 read b=(19,"fff"); +a b +19 fff +handler t2 read b=(19,"yyy"); +a b +19 yyy +handler t2 read b=(19); +a b +19 fff +handler t1 read a last; +Unknown table 't1' in HANDLER +handler t2 read a=(11); +a b +handler t2 read a>=(11); +a b +14 aaa +handler t2 read a=(18); +a b +18 eee +handler t2 read a>=(18); +a b +18 eee +handler t2 read a>(18); +a b +19 fff +handler t2 read a<=(18); +a b +18 eee +handler t2 read a<(18); +a b +17 ddd +handler t2 read a first limit 5; +a b +14 aaa +15 bbb +16 ccc +16 xxx +17 ddd +handler t2 read a next limit 3; +a b +18 eee +19 fff +19 yyy +handler t2 read a prev limit 10; +a b +19 fff +18 eee +17 ddd +16 xxx +16 ccc +15 bbb +14 aaa +handler t2 read a>=(16) limit 4; +a b +16 ccc +16 xxx +17 ddd +18 eee +handler t2 read a>=(16) limit 2,2; +a b +17 ddd +18 eee +handler t2 read a last limit 3; +a b +22 iii +21 hhh +20 ggg +handler t2 read a=(19); +a b +19 fff +handler t2 read a=(19) where b="yyy"; +a b +19 yyy +handler t2 read first; +a b +17 ddd +handler t2 read next; +a b +18 eee +alter table t1 type=innodb; +handler t2 read next; +a b +19 fff +handler t2 read last; +You have an error in your SQL syntax near '' at line 1 +handler t2 close; +drop table if exists t1; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 0ddd4d357d0..e6d57899082 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -578,17 +578,11 @@ explain select a,b,c from t1; drop table t1; # -# Check describe & handler +# Check describe # create table t1 (t int not null default 1, key (t)) type=innodb; desc t1; ---error 1031 -handler t1 open t1; ---error 1109 -handler t1 read t first; ---error 1109 -handler t1 close; drop table t1; # diff --git a/mysql-test/t/innodb_handler.test b/mysql-test/t/innodb_handler.test new file mode 100644 index 00000000000..2f53de3beb7 --- /dev/null +++ b/mysql-test/t/innodb_handler.test @@ -0,0 +1,69 @@ +-- source include/have_innodb.inc + +# +# test of HANDLER ... +# + +drop table if exists t1; +create table t1 (a int, b char(10), key a(a), key b(a,b)) type=innodb; +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; +alter table t1 type=innodb; +handler t2 read next; +!$1064 handler t2 read last; + +handler t2 close; +drop table if exists t1; + |