~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to sql/ha_ndb_index_stat.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 
3
 
 
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.
 
7
 
 
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.
 
12
 
 
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
 
16
*/
 
17
 
 
18
/* provides declarations only to index_stat.cc */
 
19
 
 
20
extern struct st_ndb_status g_ndb_status;
 
21
 
 
22
extern pthread_mutex_t ndbcluster_mutex;
 
23
 
 
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;
 
27
 
 
28
/* protect entry lists where needed */
 
29
extern pthread_mutex_t ndb_index_stat_list_mutex;
 
30
 
 
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;
 
34
 
 
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;
 
39
 
 
40
void 
 
41
compute_index_bounds(NdbIndexScanOperation::IndexBound & bound,
 
42
                     const KEY *key_info,
 
43
                     const key_range *start_key, const key_range *end_key,
 
44
                     int from);
 
45
 
 
46
/* error codes local to ha_ndb */
 
47
 
 
48
/* stats thread is not open for requests (should not happen) */
 
49
#define Ndb_index_stat_error_NOT_ALLOW          9001
 
50
 
 
51
/* stats entry for existing index not found (should not happen) */
 
52
#define Ndb_index_stat_error_NOT_FOUND          9002
 
53
 
 
54
/* request on stats entry with recent error was ignored */
 
55
#define Ndb_index_stat_error_HAS_ERROR          9003