diff options
author | Marc Alff <marc.alff@sun.com> | 2010-01-06 22:42:07 -0700 |
---|---|---|
committer | Marc Alff <marc.alff@sun.com> | 2010-01-06 22:42:07 -0700 |
commit | 3d915225611a921fad03934e58bf281b48fc15b0 (patch) | |
tree | ea8cbc9d70015a17aad75df30e7d223476eaa4da /sql/ha_ndbcluster.h | |
parent | 4b559b912f5a3aa02a226fdacddaa3b80a8ade42 (diff) | |
download | mariadb-git-3d915225611a921fad03934e58bf281b48fc15b0.tar.gz |
WL#2360 Performance schema
Part IV: sql instrumentation
Diffstat (limited to 'sql/ha_ndbcluster.h')
-rw-r--r-- | sql/ha_ndbcluster.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h index a51dc38bf93..63da24e8dda 100644 --- a/sql/ha_ndbcluster.h +++ b/sql/ha_ndbcluster.h @@ -1,7 +1,7 @@ #ifndef HA_NDBCLUSTER_INCLUDED #define HA_NDBCLUSTER_INCLUDED -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (C) 2000-2003 MySQL AB, 2008-2009 Sun Microsystems, Inc This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,6 +35,10 @@ #define NDB_HIDDEN_PRIMARY_KEY_LENGTH 8 +#ifdef HAVE_PSI_INTERFACE +extern PSI_file_key key_file_ndb; +#endif /* HAVE_PSI_INTERFACE */ + class Ndb; // Forward declaration class NdbOperation; // Forward declaration @@ -102,7 +106,7 @@ typedef struct st_ndbcluster_share { NDB_SHARE_STATE state; MEM_ROOT mem_root; THR_LOCK lock; - pthread_mutex_t mutex; + mysql_mutex_t mutex; char *key; uint key_length; THD *util_lock; @@ -131,9 +135,9 @@ NDB_SHARE_STATE get_ndb_share_state(NDB_SHARE *share) { NDB_SHARE_STATE state; - pthread_mutex_lock(&share->mutex); + mysql_mutex_lock(&share->mutex); state= share->state; - pthread_mutex_unlock(&share->mutex); + mysql_mutex_unlock(&share->mutex); return state; } @@ -141,19 +145,19 @@ inline void set_ndb_share_state(NDB_SHARE *share, NDB_SHARE_STATE state) { - pthread_mutex_lock(&share->mutex); + mysql_mutex_lock(&share->mutex); share->state= state; - pthread_mutex_unlock(&share->mutex); + mysql_mutex_unlock(&share->mutex); } struct Ndb_tuple_id_range_guard { Ndb_tuple_id_range_guard(NDB_SHARE* _share) : share(_share), range(share->tuple_id_range) { - pthread_mutex_lock(&share->mutex); + mysql_mutex_lock(&share->mutex); } ~Ndb_tuple_id_range_guard() { - pthread_mutex_unlock(&share->mutex); + mysql_mutex_unlock(&share->mutex); } NDB_SHARE* share; Ndb::TupleIdRange& range; @@ -578,6 +582,6 @@ static const char ndbcluster_hton_name[]= "ndbcluster"; static const int ndbcluster_hton_name_length=sizeof(ndbcluster_hton_name)-1; extern int ndbcluster_terminating; extern int ndb_util_thread_running; -extern pthread_cond_t COND_ndb_util_ready; +extern mysql_cond_t COND_ndb_util_ready; #endif /* HA_NDBCLUSTER_INCLUDED */ |