1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-06 13:10:12 +03:00

Fix for #Bug35048 "maria table corruption reported when transactional=0

Problem was that page in bitmap was marked as full even if there was free places in page directory


mysql-test/r/maria.result:
  Test case for problem with head/tail page with 255 entries
  (Bug 35048 "maria table corruption reported when transactional=0)
mysql-test/t/maria.test:
  Test case for problem with head/tail page with 255 entries
  (Bug 35048 "maria table corruption reported when transactional=0)
storage/maria/ma_blockrec.c:
  Fix to ensure that bitmap is marked 'full' when the head/tail page directory is full
storage/maria/ma_check.c:
  Better check when directory for head/tail pages are marked full (The page directory can't hold a row tail + blob tails)
This commit is contained in:
unknown
2008-03-08 02:07:03 +02:00
parent d6a868cc20
commit 42455c483c
4 changed files with 108 additions and 10 deletions

View File

@@ -2254,3 +2254,21 @@ t1 CREATE TABLE `t1` (
`c` char(1) DEFAULT NULL
) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
drop table t1;
create table t1 (i int auto_increment not null primary key) transactional=0;
check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
delete from t1 where i = 10;
check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
create table t1 (i int auto_increment not null primary key);
check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
delete from t1 where i = 10;
check table t1 extended;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;

View File

@@ -1455,6 +1455,41 @@ alter table t1 engine=maria;
show create table t1;
drop table t1;
#
# Test problems with small rows and row_type=page
# Bug 35048 "maria table corruption reported when transactional=0"
#
create table t1 (i int auto_increment not null primary key) transactional=0;
let $i=510;
--disable_query_log
while ($i)
{
dec $i;
insert into t1 values (null);
}
--enable_query_log
check table t1 extended;
delete from t1 where i = 10;
check table t1 extended;
drop table t1;
create table t1 (i int auto_increment not null primary key);
let $i=510;
--disable_query_log
while ($i)
{
dec $i;
insert into t1 values (null);
}
--enable_query_log
check table t1 extended;
delete from t1 where i = 10;
check table t1 extended;
drop table t1;
# End of 5.1 tests
--disable_result_log