mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
3357bc7ea3
Make ENGINE= an alias for TYPE= (Compabiltiy with 4.1) Fix when using symlinked data files and realpath() is not working client/mysqltest.c: Copied mysqltest from 4.1 and modified this to compile in 4.0 This was needed to get replace_columns to work. include/my_sys.h: Stop compiler warnings about alloca on freebsd myisam/mi_check.c: Fix when using symlinked data files and realpath() is not working mysql-test/r/handler.result: test engine= mysql-test/r/rpl_max_relay_size.result: Use replace_columns to replace some 'not constant' columns mysql-test/r/rpl_rotate_logs.result: Use replace_columns to replace some 'not constant' columns mysql-test/r/rpl_trunc_binlog.result: Use replace_columns to replace some 'not constant' columns mysql-test/t/handler.test: test engine= mysql-test/t/rpl_log_pos.test: Use replace_columns to replace some 'not constant' columns mysql-test/t/rpl_max_relay_size.test: Use replace_columns to replace some 'not constant' columns mysql-test/t/rpl_rotate_logs.test: Use replace_columns to replace some 'not constant' columns mysql-test/t/rpl_trunc_binlog.test: Use replace_columns to replace some 'not constant' columns mysys/my_symlink.c: More debugging sql/lex.h: Make ENGINE= an alias for TYPE= sql/mysqld.cc: Code cleanup strings/strto.c: Fix for True64 strings/strtoll.c: Fix for True64 strings/strtoull.c: Remove not needed include file
112 lines
2.2 KiB
Text
112 lines
2.2 KiB
Text
#
|
|
# test of HANDLER ...
|
|
#
|
|
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
|
|
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;
|
|
-- error 1064
|
|
handler t2 read a=(SELECT 1);
|
|
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 engine=MyISAM;
|
|
--error 1109
|
|
handler t2 read first;
|
|
drop table t1;
|
|
|
|
#
|
|
# Test case for the bug #787
|
|
#
|
|
create table t1 (a int);
|
|
insert into t1 values (1),(2),(3),(4),(5),(6);
|
|
delete from t1 limit 2;
|
|
handler t1 open;
|
|
handler t1 read first;
|
|
handler t1 read first limit 1,1;
|
|
handler t1 read first limit 2,2;
|
|
delete from t1 limit 3;
|
|
handler t1 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);
|
|
--error 1210
|
|
handler t1 read a=(a);
|
|
drop table t1;
|