2
Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; version 2 of the License.
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
13
You should have received a copy of the GNU General Public License
14
along with this program; if not, write to the Free Software
15
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
/* provides declarations only to index_stat.cc */
20
extern struct st_ndb_status g_ndb_status;
22
extern pthread_mutex_t ndbcluster_mutex;
24
extern pthread_t ndb_index_stat_thread;
25
extern pthread_cond_t COND_ndb_index_stat_thread;
26
extern pthread_mutex_t LOCK_ndb_index_stat_thread;
28
/* protect entry lists where needed */
29
extern pthread_mutex_t ndb_index_stat_list_mutex;
31
/* protect and signal changes in stats entries */
32
extern pthread_mutex_t ndb_index_stat_stat_mutex;
33
extern pthread_cond_t ndb_index_stat_stat_cond;
35
/* these have to live in ha_ndbcluster.cc */
36
extern bool ndb_index_stat_get_enable(THD *thd);
37
extern long g_ndb_status_index_stat_cache_query;
38
extern long g_ndb_status_index_stat_cache_clean;
41
compute_index_bounds(NdbIndexScanOperation::IndexBound & bound,
43
const key_range *start_key, const key_range *end_key,
46
/* error codes local to ha_ndb */
48
/* stats thread is not open for requests (should not happen) */
49
#define Ndb_index_stat_error_NOT_ALLOW 9001
51
/* stats entry for existing index not found (should not happen) */
52
#define Ndb_index_stat_error_NOT_FOUND 9002
54
/* request on stats entry with recent error was ignored */
55
#define Ndb_index_stat_error_HAS_ERROR 9003