2 messages in com.mysql.lists.bugsRe: Bug with delete still exists !!!| From | Sent On | Attachments |
|---|---|---|
| sas...@mysql.com | 09 May 2000 11:06 | |
| Michael Widenius | 09 May 2000 17:07 |
| Subject: | Re: Bug with delete still exists !!!![]() |
|---|---|
| From: | Michael Widenius (mon...@mysql.com) |
| Date: | 05/09/2000 05:07:56 PM |
| List: | com.mysql.lists.bugs |
"sasha" == sasha <sas...@mysql.com> writes:
sasha> Ok, I've verified the bug. Here is a very simple test case: sasha> use test; sasha> drop table if exists foo; sasha> create table foo ( word char(25) binary not null primary key) sasha> delay_key_write = 1; sasha> load data infile '/usr/dict/words' into table foo; sasha> select word from foo where word = 'a' or word = 'b'; sasha> delete from foo where word < 'l'; sasha> check table foo;
sasha> Monty and I will have a race on who can produce a patch faster. He knows
the
sasha> code better, but I am going to have a head start :-)
I assume Sasha has already posted a patch for this :)
Here is the official patch for this:
*** /my/monty/master/mysql-3.23.15-alpha/mysys/mf_keycache.c Fri Apr 28 01:16:30
2000
--- mysys/mf_keycache.c Wed May 10 01:31:51 2000
***************
*** 551,557 ****
*pos++=used;
_my_cache_write++;
}
! if (type != FLUSH_KEEP)
{
/* This will not destroy position or data */
used->changed=0;
--- 551,557 ----
*pos++=used;
_my_cache_write++;
}
! if (type != FLUSH_KEEP && type != FLUSH_FORCE_WRITE)
{
/* This will not destroy position or data */
used->changed=0;
***************
*** 567,573 ****
if ((error=flush_cached_blocks(file, cache, (uint) (pos-cache))))
last_errno=error;
}
! if (type != FLUSH_KEEP) /* This happens very seldom */
{
for (used=file_blocks[(uint) file & CHANGED_BLOCKS_MASK];
used ;
--- 567,574 ----
if ((error=flush_cached_blocks(file, cache, (uint) (pos-cache))))
last_errno=error;
}
! /* The following happens very seldom */
! if (type != FLUSH_KEEP && type != FLUSH_FORCE_WRITE)
{
for (used=file_blocks[(uint) file & CHANGED_BLOCKS_MASK];
used ;
*** /my/monty/master/mysql-3.23.15-alpha/myisam/mi_check.c Fri May 5 06:07:11
2000
--- myisam/mi_check.c Wed May 10 01:32:12 2000
***************
*** 246,251 ****
--- 246,253 ----
if (!(param->testflag & T_SILENT)) puts("- check file-size");
+ flush_key_blocks(info->s->kfile, FLUSH_FORCE_WRITE); /* If called externally
*/
+
size=my_seek(info->s->kfile,0L,MY_SEEK_END,MYF(0));
if ((skr=(my_off_t) info->state->key_file_length) != size)
{




