diff options
author | monty@mysql.com <> | 2004-04-05 13:56:05 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2004-04-05 13:56:05 +0300 |
commit | 42cf92ce37c7ce9b7356d04273a858a9e42823b5 (patch) | |
tree | 0bfd237ce668df7f8a361ddbc36762c5a16b2bae /myisam/mi_rprev.c | |
parent | 99f712a30bc6fcdb5a71cf349243295458d22074 (diff) | |
download | mariadb-git-42cf92ce37c7ce9b7356d04273a858a9e42823b5.tar.gz |
Fixed many compiler warnings
Fixed bugs in group_concat with ORDER BY and DISTINCT (Bugs #2695, #3381 and #3319)
Fixed crash when doing rollback in slave and the io thread catched up with the sql thread
Set locked_in_memory properly
Diffstat (limited to 'myisam/mi_rprev.c')
-rw-r--r-- | myisam/mi_rprev.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/myisam/mi_rprev.c b/myisam/mi_rprev.c index 4807e636252..b787210e037 100644 --- a/myisam/mi_rprev.c +++ b/myisam/mi_rprev.c @@ -52,21 +52,22 @@ int mi_rprev(MI_INFO *info, byte *buf, int inx) error=_mi_search(info,share->keyinfo+inx,info->lastkey, USE_WHOLE_KEY, flag, share->state.key_root[inx]); - if (!error) + if (share->concurrent_insert) { - while (info->lastpos >= info->state->data_file_length) + if (!error) { - /* Skip rows that are inserted by other threads since we got a lock */ - if ((error=_mi_search_next(info,share->keyinfo+inx,info->lastkey, - info->lastkey_length, - SEARCH_SMALLER, - share->state.key_root[inx]))) - break; + while (info->lastpos >= info->state->data_file_length) + { + /* Skip rows that are inserted by other threads since we got a lock */ + if ((error=_mi_search_next(info,share->keyinfo+inx,info->lastkey, + info->lastkey_length, + SEARCH_SMALLER, + share->state.key_root[inx]))) + break; + } } - } - - if (share->concurrent_insert) rw_unlock(&share->key_root_lock[inx]); + } info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->update|= HA_STATE_PREV_FOUND; if (error) |