Skip to content

Commit

Permalink
Fixed bug in macro _ma_mark_page_with_transid()
Browse files Browse the repository at this point in the history
By pure chance the macro worked in the cases it was used, but
better to get this fixed!
  • Loading branch information
montywi committed Feb 19, 2019
1 parent 98e185e commit 346e460
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions storage/maria/ma_delete.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,7 @@ static int del(MARIA_HA *info, MARIA_KEY *key,
key_start= keypos;
if (tmp_key.flag & (SEARCH_USER_KEY_HAS_TRANSID |
SEARCH_PAGE_KEY_HAS_TRANSID))
{
_ma_mark_page_with_transid(share, anc_page);
}

/* Save pointer to next leaf on parent page */
if (!(*keyinfo->get_key)(&ret_key, page_flag, share->base.key_reflength,
Expand Down
3 changes: 1 addition & 2 deletions storage/maria/ma_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,9 +843,8 @@ int _ma_insert(register MARIA_HA *info, MARIA_KEY *key,
a_length+=t_length;

if (key->flag & (SEARCH_USER_KEY_HAS_TRANSID | SEARCH_PAGE_KEY_HAS_TRANSID))
{
_ma_mark_page_with_transid(share, anc_page);
}

anc_page->size= a_length;
page_store_size(share, anc_page);

Expand Down
4 changes: 2 additions & 2 deletions storage/maria/maria_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -777,8 +777,8 @@ struct st_maria_handler
transid_korr((buff) + LSN_STORE_SIZE)
#define _ma_store_keypage_flag(share,x,flag) x[(share)->keypage_header - KEYPAGE_USED_SIZE - KEYPAGE_FLAG_SIZE]= (flag)
#define _ma_mark_page_with_transid(share, page) \
(page)->flag|= KEYPAGE_FLAG_HAS_TRANSID; \
(page)->buff[(share)->keypage_header - KEYPAGE_USED_SIZE - KEYPAGE_FLAG_SIZE]= (page)->flag;
do { (page)->flag|= KEYPAGE_FLAG_HAS_TRANSID; \
(page)->buff[(share)->keypage_header - KEYPAGE_USED_SIZE - KEYPAGE_FLAG_SIZE]= (page)->flag; } while (0)

#define KEYPAGE_KEY_VERSION(share, x) ((x) + \
(share)->keypage_header - \
Expand Down

0 comments on commit 346e460

Please sign in to comment.