mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
8d7eb4a0e5
Fields in key_expr (mysql_ha_read) wasn't linked to tables. Hmm. How did it work at all? mysql-test/r/alias.result: It's better to delete table after the test mysql-test/r/handler.result: appropriate result mysql-test/t/alias.test: it's better to drop table after test mysql-test/t/handler.test: test case for #751 sql/sql_handler.cc: fix_fields called
92 lines
1.8 KiB
Text
92 lines
1.8 KiB
Text
#
|
|
# 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);
|
|
|
|
--error 1070
|
|
handler t2 read a=(19,"fff");
|
|
|
|
handler t2 read b=(19,"fff");
|
|
handler t2 read b=(19,"yyy");
|
|
handler t2 read b=(19);
|
|
|
|
--error 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;
|
|
--error 1064
|
|
handler t2 read last;
|
|
handler t2 close;
|
|
|
|
#
|
|
# DROP TABLE / ALTER TABLE
|
|
#
|
|
handler t1 open as t2;
|
|
drop table t1;
|
|
create table t1 (a int);
|
|
insert into t1 values (17);
|
|
--error 1109
|
|
handler t2 read first;
|
|
handler t1 open as t2;
|
|
alter table t1 type=MyISAM;
|
|
--error 1109
|
|
handler t2 read first;
|
|
drop table t1;
|
|
|
|
#
|
|
#test for #751
|
|
#
|
|
create table t1(a int, index(a));
|
|
insert into t1 values (1), (2), (3);
|
|
handler t1 open;
|
|
--error 1054
|
|
handler t1 read a=(W);
|
|
drop table t1;
|
|
|