~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_write.c

MergedĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
                                  is_tree_inited(&info->bulk_insert[i])));
100
100
      if (local_lock_tree)
101
101
      {
102
 
        rw_wrlock(&share->key_root_lock[i]);
 
102
        pthread_rwlock_wrlock(&share->key_root_lock[i]);
103
103
        share->keyinfo[i].version++;
104
104
      }
105
105
      {
107
107
                        _mi_make_key(info,i,buff,record,filepos)))
108
108
        {
109
109
          if (local_lock_tree)
110
 
            rw_unlock(&share->key_root_lock[i]);
 
110
            pthread_rwlock_unlock(&share->key_root_lock[i]);
111
111
          goto err;
112
112
        }
113
113
      }
116
116
      info->update&= ~HA_STATE_RNEXT_SAME;
117
117
 
118
118
      if (local_lock_tree)
119
 
        rw_unlock(&share->key_root_lock[i]);
 
119
        pthread_rwlock_unlock(&share->key_root_lock[i]);
120
120
    }
121
121
  }
122
122
  if (share->calc_checksum)
174
174
                                  !(info->bulk_insert &&
175
175
                                    is_tree_inited(&info->bulk_insert[i])));
176
176
        if (local_lock_tree)
177
 
          rw_wrlock(&share->key_root_lock[i]);
 
177
          pthread_rwlock_wrlock(&share->key_root_lock[i]);
178
178
        {
179
179
          uint32_t key_length=_mi_make_key(info,i,buff,record,filepos);
180
180
          if (_mi_ck_delete(info,i,buff,key_length))
181
181
          {
182
182
            if (local_lock_tree)
183
 
              rw_unlock(&share->key_root_lock[i]);
 
183
              pthread_rwlock_unlock(&share->key_root_lock[i]);
184
184
            break;
185
185
          }
186
186
        }
187
187
        if (local_lock_tree)
188
 
          rw_unlock(&share->key_root_lock[i]);
 
188
          pthread_rwlock_unlock(&share->key_root_lock[i]);
189
189
      }
190
190
    }
191
191
  }
768
768
  case free_init:
769
769
    if (param->info->s->concurrent_insert)
770
770
    {
771
 
      rw_wrlock(&param->info->s->key_root_lock[param->keynr]);
 
771
      pthread_rwlock_wrlock(&param->info->s->key_root_lock[param->keynr]);
772
772
      param->info->s->keyinfo[param->keynr].version++;
773
773
    }
774
774
    return 0;
780
780
                              keylen - param->info->s->rec_reflength);
781
781
  case free_end:
782
782
    if (param->info->s->concurrent_insert)
783
 
      rw_unlock(&param->info->s->key_root_lock[param->keynr]);
 
783
      pthread_rwlock_unlock(&param->info->s->key_root_lock[param->keynr]);
784
784
    return 0;
785
785
  }
786
786
  return -1;