summaryrefslogtreecommitdiff
path: root/storage/maria/ma_delete.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@mysql.com>2008-07-09 16:09:30 +0300
committerMichael Widenius <monty@mysql.com>2008-07-09 16:09:30 +0300
commit7f02282404728d1da0990488b60c79fb53c9bf75 (patch)
treec89fb6958a0c403c789ca3b8380ed760b6e3191c /storage/maria/ma_delete.c
parentf9ef13d562756c9c084ee8c5d0f741885a4bc9a1 (diff)
downloadmariadb-git-7f02282404728d1da0990488b60c79fb53c9bf75.tar.gz
Fixes for bug#37276:
- Fixes key corruption where pages wasn't marked that they contained transid. - Fixed bug in block record that could create too small rows when transid was removed. This fixed some asserts() when testing block length Added --abort-source-on-error to the mysql client. (Very helpfull when debugging wrong .sql files) client/client_priv.h: Added enum for new option to mysql client/mysql.cc: Added new option --abort-source-on-error to allow one to get 'source' to stop on error. This is 0 by default, to keep old behaviour. Print file name and line number when getting an error when doing source filename sql/field.cc: Removed old dead code sql/sql_class.cc: Removed old dead code storage/maria/ma_blockrec.c: Added checking of min block length to check_directory() When creating new directory entry, set length to 0; This ensures that the assert checks() on block lengths works properly. Added more DBUG_ASSERT() and more calls to check_directory() In get_head_or_tail_page(), send in correct min_block_length. This is now safe as the length of new blocks are now 0 storage/maria/ma_delete.c: When moving key to parent page, mark page if key has transid storage/maria/ma_write.c: Fixed bug where _ma_find_last_pos() didn't set int_key->flag. Simpilifed code by unrolling loop.
Diffstat (limited to 'storage/maria/ma_delete.c')
-rw-r--r--storage/maria/ma_delete.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/maria/ma_delete.c b/storage/maria/ma_delete.c
index a703823e0da..1d6bb565e02 100644
--- a/storage/maria/ma_delete.c
+++ b/storage/maria/ma_delete.c
@@ -687,6 +687,9 @@ static int del(MARIA_HA *info, MARIA_KEY *key,
bmove(keypos,keypos-length, (int) (endpos-keypos)+length);
(*keyinfo->store_key)(keyinfo,keypos,&s_temp);
key_start= keypos;
+ if (tmp_key.flag & (SEARCH_USER_KEY_HAS_TRANSID |
+ SEARCH_PAGE_KEY_HAS_TRANSID))
+ _ma_mark_page_with_transid(share, anc_buff);
/* Save pointer to next leaf on parent page */
if (!(*keyinfo->get_key)(&ret_key, page_flag, share->base.key_reflength,