~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_plugin.cc

  • Committer: Brian Aker
  • Date: 2008-12-05 19:17:37 UTC
  • Revision ID: brian@tangent.org-20081205191737-pp8u84pdz6dcp182
Part removal of my_pthread.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
709
709
    plugin_dl_del(&plugin->plugin_dl->dl);
710
710
  plugin->state= PLUGIN_IS_FREED;
711
711
  plugin_array_version++;
712
 
  rw_wrlock(&LOCK_system_variables_hash);
 
712
  pthread_rwlock_wrlock(&LOCK_system_variables_hash);
713
713
  mysql_del_sys_var_chain(plugin->system_vars);
714
 
  rw_unlock(&LOCK_system_variables_hash);
 
714
  pthread_rwlock_unlock(&LOCK_system_variables_hash);
715
715
  free_root(&plugin->mem_root, MYF(0));
716
716
  return;
717
717
}
1620
1620
  sys_var_pluginvar *pi= NULL;
1621
1621
  plugin_ref plugin;
1622
1622
 
1623
 
  rw_rdlock(&LOCK_system_variables_hash);
 
1623
  pthread_rwlock_rdlock(&LOCK_system_variables_hash);
1624
1624
  if ((var= intern_find_sys_var(str, length, false)) &&
1625
1625
      (pi= var->cast_pluginvar()))
1626
1626
  {
1627
 
    rw_unlock(&LOCK_system_variables_hash);
 
1627
    pthread_rwlock_unlock(&LOCK_system_variables_hash);
1628
1628
    LEX *lex= session ? session->lex : 0;
1629
1629
    if (!(plugin= my_intern_plugin_lock(lex, plugin_int_to_ref(pi->plugin))))
1630
1630
      var= NULL; /* failed to lock it, it must be uninstalling */
1637
1637
    }
1638
1638
  }
1639
1639
  else
1640
 
    rw_unlock(&LOCK_system_variables_hash);
 
1640
    pthread_rwlock_unlock(&LOCK_system_variables_hash);
1641
1641
 
1642
1642
  /*
1643
1643
    If the variable exists but the plugin it is associated with is not ready
1815
1815
  {
1816
1816
    uint32_t idx;
1817
1817
 
1818
 
    rw_rdlock(&LOCK_system_variables_hash);
 
1818
    pthread_rwlock_rdlock(&LOCK_system_variables_hash);
1819
1819
 
1820
1820
    session->variables.dynamic_variables_ptr= (char*)
1821
1821
      my_realloc(session->variables.dynamic_variables_ptr,
1873
1873
    session->variables.dynamic_variables_size=
1874
1874
           global_system_variables.dynamic_variables_size;
1875
1875
 
1876
 
    rw_unlock(&LOCK_system_variables_hash);
 
1876
    pthread_rwlock_unlock(&LOCK_system_variables_hash);
1877
1877
  }
1878
1878
  return (unsigned char*)session->variables.dynamic_variables_ptr + offset;
1879
1879
}
1960
1960
  int flags;
1961
1961
  uint32_t idx;
1962
1962
 
1963
 
  rw_rdlock(&LOCK_system_variables_hash);
 
1963
  pthread_rwlock_rdlock(&LOCK_system_variables_hash);
1964
1964
  for (idx= 0; idx < bookmark_hash.records; idx++)
1965
1965
  {
1966
1966
    v= (st_bookmark*) hash_element(&bookmark_hash, idx);
1980
1980
      *ptr= NULL;
1981
1981
    }
1982
1982
  }
1983
 
  rw_unlock(&LOCK_system_variables_hash);
 
1983
  pthread_rwlock_unlock(&LOCK_system_variables_hash);
1984
1984
 
1985
1985
  assert(vars->table_plugin == NULL);
1986
1986