mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed build issues
- Linking now with g++ instead of gcc with 'compile-dist' to solve problems with handlersocket/client - Fixed bug in heap tables when doing handler read next-prev over last row BUILD/compile-dist: - Linking now with g++ instead of gcc with 'compile-dist' to solve problems with handlersocket/client cmd-line-utils/libedit/vi.c: Fixed compiler warning about not checking return value for write mysql-test/r/index_intersect.result: Updated results (missed this file in my last push) mysql-test/suite/handler/aria.result: Updated test results mysql-test/suite/handler/handler.inc: Changed test to use read next/read prev on key where there are duplicates that can come in different order depending on system Added testing of read next-prev over last row and read prev-next around first row mysql-test/suite/handler/heap.result: Updated test results mysql-test/suite/handler/init.inc: More rows to test mysql-test/suite/handler/innodb.result: Updated test results mysql-test/suite/handler/interface.result: Updated test results mysql-test/suite/handler/myisam.result: Updated test results mysql-test/t/variables-big.test: Fixed test to not fail on windows mysql-test/valgrind.supp: Removed not matching fun: to get rid of valgrind warning storage/heap/hp_rfirst.c: Added state so that we know if we have an active position in the index. storage/heap/hp_rkey.c: Added state so that we know if we have an active position in the index. storage/heap/hp_rnext.c: Handle reading several next after finding the last row (this caused a crash before) storage/heap/hp_rprev.c: Handle reading several prev after finding the first row (this caused a crash before) storage/xtradb/buf/buf0buf.c: Fixed compiler warning about uninitialized value
This commit is contained in:
@ -4,7 +4,7 @@ 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"),(16,"ccc"),(16,"xxx"),
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii");
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii"),(23,"xxx"),(24,"xxx"),(25,"xxx");
|
||||
handler t1 open as t2;
|
||||
handler t2 read b first;
|
||||
a b
|
||||
@ -20,13 +20,13 @@ a b
|
||||
16 ccc
|
||||
handler t2 read b last;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read b prev;
|
||||
a b
|
||||
21 hhh
|
||||
24 xxx
|
||||
handler t2 read b prev;
|
||||
a b
|
||||
20 ggg
|
||||
23 xxx
|
||||
handler t2 read b first;
|
||||
a b
|
||||
14 aaa
|
||||
@ -34,13 +34,13 @@ handler t2 read b prev;
|
||||
a b
|
||||
handler t2 read b last;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read b prev;
|
||||
a b
|
||||
21 hhh
|
||||
24 xxx
|
||||
handler t2 read b next;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read b next;
|
||||
a b
|
||||
handler t2 read a=(15);
|
||||
@ -105,10 +105,10 @@ handler t2 read a>(54);
|
||||
a b
|
||||
handler t2 read a<=(54);
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read a<(54);
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read a=(1);
|
||||
a b
|
||||
handler t2 read a>=(1);
|
||||
@ -158,9 +158,9 @@ a b
|
||||
18 eee
|
||||
handler t2 read a last limit 3;
|
||||
a b
|
||||
22 iii
|
||||
21 hhh
|
||||
20 ggg
|
||||
25 xxx
|
||||
24 xxx
|
||||
23 xxx
|
||||
handler t2 read b=(16) limit 1,3;
|
||||
a b
|
||||
16 xxx
|
||||
@ -191,10 +191,10 @@ handler t1 close;
|
||||
handler t1 open;
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
21 hhh
|
||||
24 xxx
|
||||
handler t1 close;
|
||||
handler t1 open as t2;
|
||||
handler t2 read first;
|
||||
@ -204,53 +204,97 @@ alter table t1 engine = Aria;
|
||||
handler t2 read first;
|
||||
ERROR 42S02: Unknown table 't2' in HANDLER
|
||||
handler t1 open;
|
||||
handler t1 read a=(16) limit 1,3;
|
||||
handler t1 read a=(20) limit 1,3;
|
||||
a b
|
||||
16 xxx
|
||||
flush tables;
|
||||
handler t1 read a=(16) limit 1,3;
|
||||
handler t1 read a=(20) limit 1,3;
|
||||
a b
|
||||
16 xxx
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
handler t1 read a=(25);
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a=(1000);
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a=(1000);
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a=(14);
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a=(1);
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a=(1);
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
prepare stmt from 'handler t1 read a=(?) limit ?,?';
|
||||
set @a=16,@b=1,@c=100;
|
||||
set @a=20,@b=1,@c=100;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
16 xxx
|
||||
set @a=16,@b=2,@c=1;
|
||||
set @a=20,@b=2,@c=1;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
set @a=16,@b=0,@c=2;
|
||||
set @a=20,@b=0,@c=2;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
20 ggg
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a next limit ?';
|
||||
handler t1 read a>=(11);
|
||||
handler t1 read a>=(21);
|
||||
a b
|
||||
14 aaa
|
||||
21 hhh
|
||||
set @a=3;
|
||||
execute stmt using @a;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
execute stmt using @a;
|
||||
a b
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
execute stmt using @a;
|
||||
a b
|
||||
20 ggg
|
||||
21 hhh
|
||||
22 iii
|
||||
23 xxx
|
||||
24 xxx
|
||||
execute stmt using @a;
|
||||
a b
|
||||
25 xxx
|
||||
execute stmt using @a;
|
||||
a b
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read b prev limit ?';
|
||||
execute stmt using @a;
|
||||
a b
|
||||
25 xxx
|
||||
24 xxx
|
||||
23 xxx
|
||||
execute stmt using @a;
|
||||
a b
|
||||
22 iii
|
||||
21 hhh
|
||||
20 ggg
|
||||
@ -264,9 +308,6 @@ a b
|
||||
17 ddd
|
||||
16 xxx
|
||||
16 ccc
|
||||
execute stmt using @a;
|
||||
a b
|
||||
14 aaa
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read b=(?,?)';
|
||||
set @a=14, @b='aaa';
|
||||
@ -289,27 +330,27 @@ a b
|
||||
16 xxx
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a>=(?) where a < ? limit 5';
|
||||
set @a=15, @b=20;
|
||||
set @a=17, @b=24;
|
||||
execute stmt using @a,@b;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
20 ggg
|
||||
execute stmt using @a,@b;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
20 ggg
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a=(?)';
|
||||
set @a=16;
|
||||
set @a=17;
|
||||
execute stmt using @a;
|
||||
a b
|
||||
16 ccc
|
||||
17 ddd
|
||||
alter table t1 add c int;
|
||||
execute stmt using @a;
|
||||
ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
@ -319,7 +360,7 @@ ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
handler t1 open;
|
||||
prepare stmt from 'handler t1 read a=(?)';
|
||||
flush tables;
|
||||
set @a=16;
|
||||
set @a=17;
|
||||
execute stmt using @a;
|
||||
ERROR HY000: Prepared statement needs to be re-prepared
|
||||
deallocate prepare stmt;
|
||||
|
@ -120,9 +120,37 @@ eval alter table t1 engine = $engine_type;
|
||||
handler t2 read first;
|
||||
|
||||
handler t1 open;
|
||||
handler t1 read a=(16) limit 1,3;
|
||||
handler t1 read a=(20) limit 1,3;
|
||||
flush tables;
|
||||
handler t1 read a=(16) limit 1,3;
|
||||
handler t1 read a=(20) limit 1,3;
|
||||
handler t1 close;
|
||||
|
||||
#
|
||||
# Search after end and before start of index
|
||||
#
|
||||
|
||||
handler t1 open;
|
||||
handler t1 read a=(25);
|
||||
handler t1 read a next;
|
||||
handler t1 read a next;
|
||||
handler t1 read a next;
|
||||
handler t1 read a prev;
|
||||
handler t1 read a=(1000);
|
||||
handler t1 read a next;
|
||||
handler t1 read a prev;
|
||||
handler t1 read a=(1000);
|
||||
handler t1 read a prev;
|
||||
|
||||
handler t1 read a=(14);
|
||||
handler t1 read a prev;
|
||||
handler t1 read a prev;
|
||||
handler t1 read a next;
|
||||
handler t1 read a=(1);
|
||||
handler t1 read a prev;
|
||||
handler t1 read a next;
|
||||
handler t1 read a=(1);
|
||||
handler t1 read a next;
|
||||
|
||||
handler t1 close;
|
||||
|
||||
#
|
||||
@ -131,16 +159,16 @@ handler t1 close;
|
||||
|
||||
handler t1 open;
|
||||
prepare stmt from 'handler t1 read a=(?) limit ?,?';
|
||||
set @a=16,@b=1,@c=100;
|
||||
set @a=20,@b=1,@c=100;
|
||||
execute stmt using @a,@b,@c;
|
||||
set @a=16,@b=2,@c=1;
|
||||
set @a=20,@b=2,@c=1;
|
||||
execute stmt using @a,@b,@c;
|
||||
set @a=16,@b=0,@c=2;
|
||||
set @a=20,@b=0,@c=2;
|
||||
execute stmt using @a,@b,@c;
|
||||
deallocate prepare stmt;
|
||||
|
||||
prepare stmt from 'handler t1 read a next limit ?';
|
||||
handler t1 read a>=(11);
|
||||
handler t1 read a>=(21);
|
||||
set @a=3;
|
||||
execute stmt using @a;
|
||||
execute stmt using @a;
|
||||
@ -168,13 +196,13 @@ execute stmt using @a;
|
||||
deallocate prepare stmt;
|
||||
|
||||
prepare stmt from 'handler t1 read a>=(?) where a < ? limit 5';
|
||||
set @a=15, @b=20;
|
||||
set @a=17, @b=24;
|
||||
execute stmt using @a,@b;
|
||||
execute stmt using @a,@b;
|
||||
deallocate prepare stmt;
|
||||
|
||||
prepare stmt from 'handler t1 read a=(?)';
|
||||
set @a=16;
|
||||
set @a=17;
|
||||
execute stmt using @a;
|
||||
alter table t1 add c int;
|
||||
--error 1109
|
||||
@ -186,7 +214,7 @@ handler t1 close;
|
||||
handler t1 open;
|
||||
prepare stmt from 'handler t1 read a=(?)';
|
||||
flush tables;
|
||||
set @a=16;
|
||||
set @a=17;
|
||||
--error ER_NEED_REPREPARE
|
||||
execute stmt using @a;
|
||||
deallocate prepare stmt;
|
||||
|
@ -4,7 +4,7 @@ create table t1 (a int, b char(10), key a using btree (a), key b using btree (a,
|
||||
insert into t1 values
|
||||
(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"),
|
||||
(14,"aaa"),(16,"ccc"),(16,"xxx"),
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii");
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii"),(23,"xxx"),(24,"xxx"),(25,"xxx");
|
||||
handler t1 open as t2;
|
||||
handler t2 read b first;
|
||||
a b
|
||||
@ -20,13 +20,13 @@ a b
|
||||
16 ccc
|
||||
handler t2 read b last;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read b prev;
|
||||
a b
|
||||
21 hhh
|
||||
24 xxx
|
||||
handler t2 read b prev;
|
||||
a b
|
||||
20 ggg
|
||||
23 xxx
|
||||
handler t2 read b first;
|
||||
a b
|
||||
14 aaa
|
||||
@ -34,13 +34,13 @@ handler t2 read b prev;
|
||||
a b
|
||||
handler t2 read b last;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read b prev;
|
||||
a b
|
||||
21 hhh
|
||||
24 xxx
|
||||
handler t2 read b next;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read b next;
|
||||
a b
|
||||
handler t2 read a=(15);
|
||||
@ -105,10 +105,10 @@ handler t2 read a>(54);
|
||||
a b
|
||||
handler t2 read a<=(54);
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read a<(54);
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read a=(1);
|
||||
a b
|
||||
handler t2 read a>=(1);
|
||||
@ -158,9 +158,9 @@ a b
|
||||
18 eee
|
||||
handler t2 read a last limit 3;
|
||||
a b
|
||||
22 iii
|
||||
21 hhh
|
||||
20 ggg
|
||||
25 xxx
|
||||
24 xxx
|
||||
23 xxx
|
||||
handler t2 read b=(16) limit 1,3;
|
||||
a b
|
||||
16 xxx
|
||||
@ -191,10 +191,10 @@ handler t1 close;
|
||||
handler t1 open;
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
21 hhh
|
||||
24 xxx
|
||||
handler t1 close;
|
||||
handler t1 open as t2;
|
||||
handler t2 read first;
|
||||
@ -204,53 +204,97 @@ alter table t1 engine = MEMORY;
|
||||
handler t2 read first;
|
||||
ERROR 42S02: Unknown table 't2' in HANDLER
|
||||
handler t1 open;
|
||||
handler t1 read a=(16) limit 1,3;
|
||||
handler t1 read a=(20) limit 1,3;
|
||||
a b
|
||||
16 ccc
|
||||
flush tables;
|
||||
handler t1 read a=(16) limit 1,3;
|
||||
handler t1 read a=(20) limit 1,3;
|
||||
a b
|
||||
16 ccc
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
handler t1 read a=(25);
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a=(1000);
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a=(1000);
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a=(14);
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a=(1);
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a=(1);
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
prepare stmt from 'handler t1 read a=(?) limit ?,?';
|
||||
set @a=16,@b=1,@c=100;
|
||||
set @a=20,@b=1,@c=100;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
16 ccc
|
||||
set @a=16,@b=2,@c=1;
|
||||
set @a=20,@b=2,@c=1;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
set @a=16,@b=0,@c=2;
|
||||
set @a=20,@b=0,@c=2;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
16 xxx
|
||||
16 ccc
|
||||
20 ggg
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a next limit ?';
|
||||
handler t1 read a>=(11);
|
||||
handler t1 read a>=(21);
|
||||
a b
|
||||
14 aaa
|
||||
21 hhh
|
||||
set @a=3;
|
||||
execute stmt using @a;
|
||||
a b
|
||||
16 xxx
|
||||
16 ccc
|
||||
17 ddd
|
||||
execute stmt using @a;
|
||||
a b
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
execute stmt using @a;
|
||||
a b
|
||||
20 ggg
|
||||
21 hhh
|
||||
22 iii
|
||||
23 xxx
|
||||
24 xxx
|
||||
execute stmt using @a;
|
||||
a b
|
||||
25 xxx
|
||||
execute stmt using @a;
|
||||
a b
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read b prev limit ?';
|
||||
execute stmt using @a;
|
||||
a b
|
||||
25 xxx
|
||||
24 xxx
|
||||
23 xxx
|
||||
execute stmt using @a;
|
||||
a b
|
||||
22 iii
|
||||
21 hhh
|
||||
20 ggg
|
||||
@ -264,9 +308,6 @@ a b
|
||||
17 ddd
|
||||
16 xxx
|
||||
16 ccc
|
||||
execute stmt using @a;
|
||||
a b
|
||||
14 aaa
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read b=(?,?)';
|
||||
set @a=14, @b='aaa';
|
||||
@ -289,27 +330,27 @@ a b
|
||||
16 xxx
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a>=(?) where a < ? limit 5';
|
||||
set @a=15, @b=20;
|
||||
set @a=17, @b=24;
|
||||
execute stmt using @a,@b;
|
||||
a b
|
||||
16 xxx
|
||||
16 ccc
|
||||
17 ddd
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
20 ggg
|
||||
execute stmt using @a,@b;
|
||||
a b
|
||||
16 xxx
|
||||
16 ccc
|
||||
17 ddd
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
20 ggg
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a=(?)';
|
||||
set @a=16;
|
||||
set @a=17;
|
||||
execute stmt using @a;
|
||||
a b
|
||||
16 xxx
|
||||
17 ddd
|
||||
alter table t1 add c int;
|
||||
execute stmt using @a;
|
||||
ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
@ -319,7 +360,7 @@ ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
handler t1 open;
|
||||
prepare stmt from 'handler t1 read a=(?)';
|
||||
flush tables;
|
||||
set @a=16;
|
||||
set @a=17;
|
||||
execute stmt using @a;
|
||||
ERROR HY000: Prepared statement needs to be re-prepared
|
||||
deallocate prepare stmt;
|
||||
|
@ -30,4 +30,4 @@ eval create table t1 (a int, b char(10), key a $key_type (a), key b $key_type (a
|
||||
insert into t1 values
|
||||
(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"),
|
||||
(14,"aaa"),(16,"ccc"),(16,"xxx"),
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii");
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii"),(23,"xxx"),(24,"xxx"),(25,"xxx");
|
||||
|
@ -4,7 +4,7 @@ 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"),(16,"ccc"),(16,"xxx"),
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii");
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii"),(23,"xxx"),(24,"xxx"),(25,"xxx");
|
||||
handler t1 open as t2;
|
||||
handler t2 read b first;
|
||||
a b
|
||||
@ -20,13 +20,13 @@ a b
|
||||
16 ccc
|
||||
handler t2 read b last;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read b prev;
|
||||
a b
|
||||
21 hhh
|
||||
24 xxx
|
||||
handler t2 read b prev;
|
||||
a b
|
||||
20 ggg
|
||||
23 xxx
|
||||
handler t2 read b first;
|
||||
a b
|
||||
14 aaa
|
||||
@ -34,13 +34,13 @@ handler t2 read b prev;
|
||||
a b
|
||||
handler t2 read b last;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read b prev;
|
||||
a b
|
||||
21 hhh
|
||||
24 xxx
|
||||
handler t2 read b next;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read b next;
|
||||
a b
|
||||
handler t2 read a=(15);
|
||||
@ -105,10 +105,10 @@ handler t2 read a>(54);
|
||||
a b
|
||||
handler t2 read a<=(54);
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read a<(54);
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read a=(1);
|
||||
a b
|
||||
handler t2 read a>=(1);
|
||||
@ -158,9 +158,9 @@ a b
|
||||
18 eee
|
||||
handler t2 read a last limit 3;
|
||||
a b
|
||||
22 iii
|
||||
21 hhh
|
||||
20 ggg
|
||||
25 xxx
|
||||
24 xxx
|
||||
23 xxx
|
||||
handler t2 read b=(16) limit 1,3;
|
||||
a b
|
||||
16 xxx
|
||||
@ -191,10 +191,10 @@ handler t1 close;
|
||||
handler t1 open;
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
21 hhh
|
||||
24 xxx
|
||||
handler t1 close;
|
||||
handler t1 open as t2;
|
||||
handler t2 read first;
|
||||
@ -204,53 +204,97 @@ alter table t1 engine = InnoDB;
|
||||
handler t2 read first;
|
||||
ERROR 42S02: Unknown table 't2' in HANDLER
|
||||
handler t1 open;
|
||||
handler t1 read a=(16) limit 1,3;
|
||||
handler t1 read a=(20) limit 1,3;
|
||||
a b
|
||||
16 xxx
|
||||
flush tables;
|
||||
handler t1 read a=(16) limit 1,3;
|
||||
handler t1 read a=(20) limit 1,3;
|
||||
a b
|
||||
16 xxx
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
handler t1 read a=(25);
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a=(1000);
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a=(1000);
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a=(14);
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a=(1);
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a=(1);
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
16 ccc
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
prepare stmt from 'handler t1 read a=(?) limit ?,?';
|
||||
set @a=16,@b=1,@c=100;
|
||||
set @a=20,@b=1,@c=100;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
16 xxx
|
||||
set @a=16,@b=2,@c=1;
|
||||
set @a=20,@b=2,@c=1;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
set @a=16,@b=0,@c=2;
|
||||
set @a=20,@b=0,@c=2;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
20 ggg
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a next limit ?';
|
||||
handler t1 read a>=(11);
|
||||
handler t1 read a>=(21);
|
||||
a b
|
||||
14 aaa
|
||||
21 hhh
|
||||
set @a=3;
|
||||
execute stmt using @a;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
execute stmt using @a;
|
||||
a b
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
execute stmt using @a;
|
||||
a b
|
||||
20 ggg
|
||||
21 hhh
|
||||
22 iii
|
||||
23 xxx
|
||||
24 xxx
|
||||
execute stmt using @a;
|
||||
a b
|
||||
25 xxx
|
||||
execute stmt using @a;
|
||||
a b
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read b prev limit ?';
|
||||
execute stmt using @a;
|
||||
a b
|
||||
25 xxx
|
||||
24 xxx
|
||||
23 xxx
|
||||
execute stmt using @a;
|
||||
a b
|
||||
22 iii
|
||||
21 hhh
|
||||
20 ggg
|
||||
@ -264,9 +308,6 @@ a b
|
||||
17 ddd
|
||||
16 xxx
|
||||
16 ccc
|
||||
execute stmt using @a;
|
||||
a b
|
||||
14 aaa
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read b=(?,?)';
|
||||
set @a=14, @b='aaa';
|
||||
@ -289,27 +330,27 @@ a b
|
||||
16 xxx
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a>=(?) where a < ? limit 5';
|
||||
set @a=15, @b=20;
|
||||
set @a=17, @b=24;
|
||||
execute stmt using @a,@b;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
20 ggg
|
||||
execute stmt using @a,@b;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
20 ggg
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a=(?)';
|
||||
set @a=16;
|
||||
set @a=17;
|
||||
execute stmt using @a;
|
||||
a b
|
||||
16 ccc
|
||||
17 ddd
|
||||
alter table t1 add c int;
|
||||
execute stmt using @a;
|
||||
ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
@ -319,7 +360,7 @@ ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
handler t1 open;
|
||||
prepare stmt from 'handler t1 read a=(?)';
|
||||
flush tables;
|
||||
set @a=16;
|
||||
set @a=17;
|
||||
execute stmt using @a;
|
||||
ERROR HY000: Prepared statement needs to be re-prepared
|
||||
deallocate prepare stmt;
|
||||
|
@ -6,7 +6,7 @@ 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"),(16,"ccc"),(16,"xxx"),
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii");
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii"),(23,"xxx"),(24,"xxx"),(25,"xxx");
|
||||
handler t1 open;
|
||||
handler t1 read a=(SELECT 1);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1)' at line 1
|
||||
|
@ -4,7 +4,7 @@ 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"),(16,"ccc"),(16,"xxx"),
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii");
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii"),(23,"xxx"),(24,"xxx"),(25,"xxx");
|
||||
handler t1 open as t2;
|
||||
handler t2 read b first;
|
||||
a b
|
||||
@ -20,13 +20,13 @@ a b
|
||||
16 ccc
|
||||
handler t2 read b last;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read b prev;
|
||||
a b
|
||||
21 hhh
|
||||
24 xxx
|
||||
handler t2 read b prev;
|
||||
a b
|
||||
20 ggg
|
||||
23 xxx
|
||||
handler t2 read b first;
|
||||
a b
|
||||
14 aaa
|
||||
@ -34,13 +34,13 @@ handler t2 read b prev;
|
||||
a b
|
||||
handler t2 read b last;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read b prev;
|
||||
a b
|
||||
21 hhh
|
||||
24 xxx
|
||||
handler t2 read b next;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read b next;
|
||||
a b
|
||||
handler t2 read a=(15);
|
||||
@ -105,10 +105,10 @@ handler t2 read a>(54);
|
||||
a b
|
||||
handler t2 read a<=(54);
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read a<(54);
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t2 read a=(1);
|
||||
a b
|
||||
handler t2 read a>=(1);
|
||||
@ -158,9 +158,9 @@ a b
|
||||
18 eee
|
||||
handler t2 read a last limit 3;
|
||||
a b
|
||||
22 iii
|
||||
21 hhh
|
||||
20 ggg
|
||||
25 xxx
|
||||
24 xxx
|
||||
23 xxx
|
||||
handler t2 read b=(16) limit 1,3;
|
||||
a b
|
||||
16 xxx
|
||||
@ -191,10 +191,10 @@ handler t1 close;
|
||||
handler t1 open;
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
22 iii
|
||||
25 xxx
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
21 hhh
|
||||
24 xxx
|
||||
handler t1 close;
|
||||
handler t1 open as t2;
|
||||
handler t2 read first;
|
||||
@ -204,53 +204,97 @@ alter table t1 engine = MyISAM;
|
||||
handler t2 read first;
|
||||
ERROR 42S02: Unknown table 't2' in HANDLER
|
||||
handler t1 open;
|
||||
handler t1 read a=(16) limit 1,3;
|
||||
handler t1 read a=(20) limit 1,3;
|
||||
a b
|
||||
16 xxx
|
||||
flush tables;
|
||||
handler t1 read a=(16) limit 1,3;
|
||||
handler t1 read a=(20) limit 1,3;
|
||||
a b
|
||||
16 xxx
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
handler t1 read a=(25);
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a=(1000);
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a=(1000);
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
25 xxx
|
||||
handler t1 read a=(14);
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a=(1);
|
||||
a b
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a=(1);
|
||||
a b
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
prepare stmt from 'handler t1 read a=(?) limit ?,?';
|
||||
set @a=16,@b=1,@c=100;
|
||||
set @a=20,@b=1,@c=100;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
16 xxx
|
||||
set @a=16,@b=2,@c=1;
|
||||
set @a=20,@b=2,@c=1;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
set @a=16,@b=0,@c=2;
|
||||
set @a=20,@b=0,@c=2;
|
||||
execute stmt using @a,@b,@c;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
20 ggg
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a next limit ?';
|
||||
handler t1 read a>=(11);
|
||||
handler t1 read a>=(21);
|
||||
a b
|
||||
14 aaa
|
||||
21 hhh
|
||||
set @a=3;
|
||||
execute stmt using @a;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
execute stmt using @a;
|
||||
a b
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
execute stmt using @a;
|
||||
a b
|
||||
20 ggg
|
||||
21 hhh
|
||||
22 iii
|
||||
23 xxx
|
||||
24 xxx
|
||||
execute stmt using @a;
|
||||
a b
|
||||
25 xxx
|
||||
execute stmt using @a;
|
||||
a b
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read b prev limit ?';
|
||||
execute stmt using @a;
|
||||
a b
|
||||
25 xxx
|
||||
24 xxx
|
||||
23 xxx
|
||||
execute stmt using @a;
|
||||
a b
|
||||
22 iii
|
||||
21 hhh
|
||||
20 ggg
|
||||
@ -264,9 +308,6 @@ a b
|
||||
17 ddd
|
||||
16 xxx
|
||||
16 ccc
|
||||
execute stmt using @a;
|
||||
a b
|
||||
14 aaa
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read b=(?,?)';
|
||||
set @a=14, @b='aaa';
|
||||
@ -289,27 +330,27 @@ a b
|
||||
16 xxx
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a>=(?) where a < ? limit 5';
|
||||
set @a=15, @b=20;
|
||||
set @a=17, @b=24;
|
||||
execute stmt using @a,@b;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
20 ggg
|
||||
execute stmt using @a,@b;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
20 ggg
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'handler t1 read a=(?)';
|
||||
set @a=16;
|
||||
set @a=17;
|
||||
execute stmt using @a;
|
||||
a b
|
||||
16 ccc
|
||||
17 ddd
|
||||
alter table t1 add c int;
|
||||
execute stmt using @a;
|
||||
ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
@ -319,7 +360,7 @@ ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
handler t1 open;
|
||||
prepare stmt from 'handler t1 read a=(?)';
|
||||
flush tables;
|
||||
set @a=16;
|
||||
set @a=17;
|
||||
execute stmt using @a;
|
||||
ERROR HY000: Prepared statement needs to be re-prepared
|
||||
deallocate prepare stmt;
|
||||
|
Reference in New Issue
Block a user