diff options
author | Sergey Vojtovich <svoj@sun.com> | 2010-03-25 15:49:01 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@sun.com> | 2010-03-25 15:49:01 +0400 |
commit | ba33a3357dc347091f12ab212aadefb93a2f86b3 (patch) | |
tree | d3b39aa166d2a77689a2f0be9c1add2287b23977 /mysql-test/t/handler_myisam.test | |
parent | 8d514f21459b2bc767d7be00ab05ccf615c33e6b (diff) | |
download | mariadb-git-ba33a3357dc347091f12ab212aadefb93a2f86b3.tar.gz |
BUG#51877 - HANDLER interface causes invalid memory read
Invalid memory read if HANDLER ... READ NEXT is executed
after failed (e.g. empty table) HANDLER ... READ FIRST.
The problem was that we attempted to perform READ NEXT,
whereas there is no pivot available from failed READ FIRST.
With this fix READ NEXT after failed READ FIRST equals
to READ FIRST.
This bug affects MyISAM tables only.
Diffstat (limited to 'mysql-test/t/handler_myisam.test')
-rw-r--r-- | mysql-test/t/handler_myisam.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/handler_myisam.test b/mysql-test/t/handler_myisam.test index da02a90af0f..868ba14480a 100644 --- a/mysql-test/t/handler_myisam.test +++ b/mysql-test/t/handler_myisam.test @@ -37,4 +37,15 @@ TRUNCATE t1; HANDLER t1 READ FIRST; DROP TABLE t1; +--echo # +--echo # BUG#51877 - HANDLER interface causes invalid memory read +--echo # +CREATE TABLE t1(a INT, KEY(a)); +HANDLER t1 OPEN; +HANDLER t1 READ a FIRST; +INSERT INTO t1 VALUES(1); +HANDLER t1 READ a NEXT; +HANDLER t1 CLOSE; +DROP TABLE t1; + --echo End of 5.1 tests |