summaryrefslogtreecommitdiff
path: root/myisam/mi_open.c
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-09-05 06:42:55 +0300
committerunknown <monty@mashka.mysql.fi>2003-09-05 06:42:55 +0300
commita91b55ce48ca9e4472eecdaefaa584af890821e4 (patch)
tree5dd76a6d814942ef3e3f103a780cc8adc7877e7d /myisam/mi_open.c
parent5e9e6eea1d98404826091dc49dd83fd6bae953af (diff)
downloadmariadb-git-a91b55ce48ca9e4472eecdaefaa584af890821e4.tar.gz
Fixed rare bug in MYISAM introduced in 4.0.3 where the index file header was not updated directly after an UPDATE of split dynamic rows.
myisam/mi_locking.c: Added DBUG info myisam/mi_open.c: Added DBUG info myisam/mi_update.c: More comments Fixed rare bug in MYISAM introduced in 4.0.3 where the index file header was not updated directly after an UPDATE of split dynamic rows. mysql-test/r/myisam.result: Added test case for MyISAM UPDATE bug mysql-test/t/myisam.test: Added test case for MyISAM UPDATE bug
Diffstat (limited to 'myisam/mi_open.c')
-rw-r--r--myisam/mi_open.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index 857ca1486fd..580261d8078 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -730,6 +730,7 @@ uint mi_state_info_write(File file, MI_STATE_INFO *state, uint pWrite)
uchar *ptr=buff;
uint i, keys= (uint) state->header.keys,
key_blocks=state->header.max_block_size;
+ DBUG_ENTER("mi_state_info_write");
memcpy_fixed(ptr,&state->header,sizeof(state->header));
ptr+=sizeof(state->header);
@@ -780,10 +781,10 @@ uint mi_state_info_write(File file, MI_STATE_INFO *state, uint pWrite)
}
if (pWrite & 1)
- return my_pwrite(file,(char*) buff, (uint) (ptr-buff), 0L,
- MYF(MY_NABP | MY_THREADSAFE));
- else
- return my_write(file, (char*) buff, (uint) (ptr-buff), MYF(MY_NABP));
+ DBUG_RETURN(my_pwrite(file,(char*) buff, (uint) (ptr-buff), 0L,
+ MYF(MY_NABP | MY_THREADSAFE)));
+ DBUG_RETURN(my_write(file, (char*) buff, (uint) (ptr-buff),
+ MYF(MY_NABP)));
}