~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_rprev.c

  • Committer: Monty Taylor
  • Date: 2008-09-05 22:55:50 UTC
  • mfrom: (373.1.9 stl-client-progs)
  • Revision ID: monty@inaugust.com-20080905225550-zco374c9s7kxwqyb
Merged removal of DYNAMIC_STRING.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
           based on the position of the last used key!
23
23
        */
24
24
 
25
 
int mi_rprev(MI_INFO *info, unsigned char *buf, int inx)
 
25
int mi_rprev(MI_INFO *info, uchar *buf, int inx)
26
26
{
27
27
  int error,changed;
28
 
  register uint32_t flag;
 
28
  register uint flag;
29
29
  MYISAM_SHARE *share=info->s;
30
30
 
31
31
  if ((inx = _mi_check_index(info,inx)) < 0)
38
38
    return(my_errno);
39
39
  changed=_mi_test_if_changed(info);
40
40
  if (share->concurrent_insert)
41
 
    pthread_rwlock_rdlock(&share->key_root_lock[inx]);
 
41
    rw_rdlock(&share->key_root_lock[inx]);
42
42
  if (!flag)
43
43
    error=_mi_search_last(info, share->keyinfo+inx,
44
44
                          share->state.key_root[inx]);
64
64
          break;
65
65
      }
66
66
    }
67
 
    pthread_rwlock_unlock(&share->key_root_lock[inx]);
 
67
    rw_unlock(&share->key_root_lock[inx]);
68
68
  }
69
69
  info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
70
70
  info->update|= HA_STATE_PREV_FOUND;