Commit 9554b40d authored by unknown's avatar unknown

Maria: it is allowed to change unknown type to any legal type of page

in the pagecache: fixing wrong assertion and a test case.
maria.test and ps_maria.test still fail.


mysql-test/r/maria.result:
  result update
mysql-test/t/maria.test:
  added test for incorrect assert on page's type
storage/maria/ma_pagecache.c:
  It is allowed to change unknown type to any legal type of page in the
  pagecache.
parent 9b1e83db
......@@ -33,6 +33,10 @@ test.t1 repair status OK
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
flush table t1;
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
drop table t1;
create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b));
insert into t1 (b) values (1),(2),(2),(2),(2);
......
......@@ -57,6 +57,10 @@ delete from t1 where (a & 1);
check table t1;
repair table t1;
check table t1;
# FLUSH + REPAIR used to cause assertion failure in page cache
flush table t1;
repair table t1;
drop table t1;
#
......
......@@ -2865,7 +2865,9 @@ uchar *pagecache_valid_read(PAGECACHE *pagecache,
(pin == PAGECACHE_PIN)),
&page_st);
DBUG_ASSERT(block->type == PAGECACHE_EMPTY_PAGE ||
block->type == type || type == PAGECACHE_READ_UNKNOWN_PAGE);
block->type == type ||
type == PAGECACHE_READ_UNKNOWN_PAGE ||
block->type == PAGECACHE_READ_UNKNOWN_PAGE);
if (type != PAGECACHE_READ_UNKNOWN_PAGE ||
block->type == PAGECACHE_EMPTY_PAGE)
block->type= type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment