summaryrefslogtreecommitdiff
path: root/myisam/mi_delete.c
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-09-20 04:54:10 +0300
committerunknown <monty@donna.mysql.com>2000-09-20 04:54:10 +0300
commit5a2419eb89d2f617e94ebef64ffbef72417ec94c (patch)
tree9809b1ec91af01ed8cc76e542fe1a102e239d9b1 /myisam/mi_delete.c
parent5a4aa474d879ac9598941665bef6f0938efc91e1 (diff)
downloadmariadb-git-5a2419eb89d2f617e94ebef64ffbef72417ec94c.tar.gz
Small bug fixes + code for DELETE QUICK
Docs/manual.texi: Change log + bug fixes from the mailing list configure.in: added mlockall include/config-win.h: Fix to use SAFE_MUTEX include/ft_global.h: Free memory include/my_pthread.h: Fix for SAFE_MUTEX on windows myisam/Makefile.am: Fix modes myisam/ft_static.c: Fix language problem with fulltext myisam/ft_stopwords.c: Free memory at end myisam/mi_create.c: Fix language problem with fulltext myisam/mi_delete.c: Added optimization to not join blocks when using delete with QUICK myisam/mi_panic.c: Added freeing of memorty myisam/mi_test2.c: Added quick mode myisam/myisamchk.c: Fixed help text myisam/myisamdef.h: Added optimization to not join blocks when using delete with QUICK mysys/mf_format.c: Don't change case for extension mysys/my_wincond.c: Fix for safe mutex mysys/thr_mutex.c: Fix for safe mutex sql-bench/test-insert.sh: Split delete test to get more information about the times sql/ChangeLog: Changelog sql/ha_myisam.cc: Better OPTIMIZE handling sql/log.cc: Cleanup sql/mysql_priv.h: Fix for safe mutex sql/mysqld.cc: Added define for --one-thread option sql/sql_class.h: Fixed lock_time in slow_log sql/sql_delete.cc: Fix for safe mutex sql/sql_parse.cc: Fix processlist message for new process sql/sql_table.cc: Fix windows problem med CREATE INDEX sql/sql_yacc.yy: Fix for safe mutex sql/table.cc: Made code simpler strings/bmove512.c: Small speed fix support-files/mysql.server.sh: Fixed awk usage
Diffstat (limited to 'myisam/mi_delete.c')
-rw-r--r--myisam/mi_delete.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/myisam/mi_delete.c b/myisam/mi_delete.c
index d014c07bc96..f8bc37d8e20 100644
--- a/myisam/mi_delete.c
+++ b/myisam/mi_delete.c
@@ -247,9 +247,9 @@ static int d_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
{ /* On leaf page */
if (_mi_write_keypage(info,keyinfo,page,anc_buff))
DBUG_RETURN(-1);
- if (length <= (uint) keyinfo->underflow_block_length)
- DBUG_RETURN(1); /* Page will be update later */
- DBUG_RETURN(0);
+ /* Page will be update later if we return 1 */
+ DBUG_RETURN(test(length <= (info->quick_mode ? MI_MIN_KEYBLOCK_LENGTH :
+ (uint) keyinfo->underflow_block_length)));
}
save_flag=1;
ret_value=del(info,keyinfo,key,anc_buff,leaf_page,leaf_buff,keypos,
@@ -385,7 +385,9 @@ static int del(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key,
_mi_kpointer(info,keypos - share->base.key_reflength,next_block);
mi_putint(anc_buff,a_length+length,share->base.key_reflength);
- DBUG_RETURN( mi_getint(leaf_buff) <= (uint) keyinfo->underflow_block_length);
+ DBUG_RETURN( mi_getint(leaf_buff) <=
+ (info->quick_mode ? MI_MIN_KEYBLOCK_LENGTH :
+ (uint) keyinfo->underflow_block_length));
err:
DBUG_RETURN(-1);
} /* del */
@@ -537,7 +539,8 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo,
}
if (_mi_write_keypage(info,keyinfo,leaf_page,leaf_buff))
goto err;
- DBUG_RETURN(anc_length <= (uint) keyinfo->underflow_block_length);
+ DBUG_RETURN(anc_length <= ((info->quick_mode ? MI_MIN_BLOCK_LENGTH :
+ (uint) keyinfo->underflow_block_length)));
}
DBUG_PRINT("test",("use left page"));