~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/server_includes.h

  • Committer: Jay Pipes
  • Date: 2009-07-08 05:36:50 UTC
  • mto: (1095.1.1 merge)
  • mto: This revision was merged to the branch mainline in revision 1096.
  • Revision ID: jpipes@serialcoder-20090708053650-fxqjm85mqb1ezrqe
Removes a bunch of dead code and unused variables in drizzled.cc and server_includes.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
/**
21
 
  @file
22
 
 
23
 
  @details
24
 
  Mostly this file is used in the server. But a little part of it is used in
25
 
  definition of SELECT_DISTINCT and others.
26
 
 
27
 
  @TODO Name this file better. "priv" could mean private, privileged, privileges.
28
 
*/
 
21
 * @file
 
22
 *
 
23
 * Various server-wide declarations and variables.
 
24
 */
29
25
 
30
26
#ifndef DRIZZLED_SERVER_INCLUDES_H
31
27
#define DRIZZLED_SERVER_INCLUDES_H
57
53
#include <sstream>
58
54
#include <bitset>
59
55
 
60
 
 
61
 
extern const CHARSET_INFO *system_charset_info, *files_charset_info ;
62
 
extern const CHARSET_INFO *national_charset_info, *table_alias_charset;
63
 
 
64
56
typedef struct drizzled_lock_st DRIZZLE_LOCK;
65
57
typedef struct st_ha_create_information HA_CREATE_INFO;
66
58
 
67
59
/* information schema */
68
60
static const std::string INFORMATION_SCHEMA_NAME("information_schema");
69
61
 
70
 
 
71
 
 
72
62
/* mysqld.cc */
73
63
class ListenHandler;
74
64
void refresh_status(Session *session);
92
82
int find_string_in_array(LEX_STRING * const haystack, LEX_STRING * const needle,
93
83
                         const CHARSET_INFO * const cs);
94
84
 
95
 
 
96
85
/*
97
86
  External variables
98
87
*/
99
88
 
 
89
extern const CHARSET_INFO *system_charset_info;
 
90
extern const CHARSET_INFO *files_charset_info ;
 
91
extern const CHARSET_INFO *table_alias_charset;
 
92
 
100
93
extern char *drizzle_tmpdir;
101
94
extern const LEX_STRING command_name[];
102
 
extern const char *first_keyword, *my_localhost, *delayed_user, *binary_keyword;
103
 
extern const char *in_left_expr_name, *in_additional_cond, *in_having_cond;
104
 
extern const char * const TRG_EXT;
105
 
extern const char * const TRN_EXT;
 
95
extern const char *first_keyword;
 
96
extern const char *binary_keyword;
 
97
extern const char *in_left_expr_name;
 
98
extern const char *in_additional_cond;
 
99
extern const char *in_having_cond;
106
100
extern char language[FN_REFLEN];
107
 
extern char glob_hostname[FN_REFLEN], drizzle_home[FN_REFLEN];
108
 
extern char pidfile_name[FN_REFLEN], system_time_zone[30];
 
101
extern char glob_hostname[FN_REFLEN];
 
102
extern char drizzle_home[FN_REFLEN];
 
103
extern char pidfile_name[FN_REFLEN];
 
104
extern char system_time_zone[30];
109
105
extern char *opt_tc_log_file;
110
106
extern const double log_10[309];
111
107
extern uint64_t log_10_int[20];
112
 
extern uint64_t keybuff_size;
113
108
extern uint64_t session_startup_options;
114
109
extern uint32_t thread_id;
115
110
extern uint64_t aborted_threads;
116
111
extern uint64_t aborted_connects;
117
 
extern uint64_t slow_launch_threads;
118
112
extern uint64_t table_cache_size;
119
113
extern uint64_t table_def_size;
120
114
extern uint64_t max_connect_errors;
121
115
extern uint32_t connect_timeout;
122
116
extern uint32_t back_log;
123
117
extern pid_t current_pid;
124
 
extern uint64_t expire_logs_days;
125
 
extern uint64_t tc_log_max_pages_used;
126
 
extern uint64_t tc_log_page_size;
127
 
extern uint64_t opt_tc_log_size;
128
 
extern uint64_t tc_log_page_waits;
129
 
extern bool opt_innodb;
130
 
extern uint32_t test_flags,ha_open_options;
131
 
extern uint32_t drizzled_tcp_port, dropping_tables;
 
118
extern uint32_t test_flags;
 
119
extern uint32_t ha_open_options;
 
120
extern uint32_t drizzled_tcp_port;
 
121
extern uint32_t dropping_tables;
132
122
extern uint32_t delay_key_write_options;
133
 
extern bool opt_endinfo, using_udf_functions;
 
123
extern bool opt_endinfo;
134
124
extern bool locked_in_memory;
135
 
extern bool using_update_log, server_id_supplied;
136
 
extern ulong log_output_options;
137
 
extern bool opt_character_set_client_handshake;
138
 
extern bool volatile abort_loop, shutdown_in_progress;
139
 
extern uint32_t volatile thread_running, global_read_lock;
140
 
extern bool opt_safe_user_create;
141
 
extern bool opt_no_mix_types;
142
 
extern bool opt_safe_show_db, opt_myisam_use_mmap;
 
125
extern bool volatile abort_loop;
 
126
extern bool volatile shutdown_in_progress;
 
127
extern uint32_t volatile thread_running;
 
128
extern uint32_t volatile global_read_lock;
143
129
extern bool opt_readonly;
144
130
extern char* opt_secure_file_priv;
145
 
extern bool opt_noacl;
146
 
extern bool opt_old_style_user_limits;
147
131
extern char *default_tz_name;
148
132
 
149
 
extern TableList general_log, slow_log;
150
133
extern FILE *stderror_file;
151
 
extern pthread_mutex_t LOCK_create_db, LOCK_open,
152
 
       LOCK_thread_count,LOCK_user_locks, LOCK_status,
153
 
       LOCK_global_read_lock,
154
 
       LOCK_global_system_variables;
 
134
extern pthread_mutex_t LOCK_create_db;
 
135
extern pthread_mutex_t LOCK_open;
 
136
extern pthread_mutex_t LOCK_thread_count;
 
137
extern pthread_mutex_t LOCK_status;
 
138
extern pthread_mutex_t LOCK_global_read_lock;
 
139
extern pthread_mutex_t LOCK_global_system_variables;
155
140
 
156
141
extern pthread_rwlock_t LOCK_system_variables_hash;
157
 
extern pthread_cond_t COND_refresh, COND_thread_count;
 
142
extern pthread_cond_t COND_refresh;
 
143
extern pthread_cond_t COND_thread_count;
158
144
extern pthread_cond_t COND_global_read_lock;
159
145
extern pthread_attr_t connection_attrib;
160
 
extern std::vector<Session*> session_list;
 
146
extern std::vector<Session *> session_list;
161
147
extern String my_empty_string;
162
148
extern const String my_null_string;
163
149
extern SHOW_VAR status_vars[];
164
150
extern struct system_variables max_system_variables;
165
151
extern struct system_status_var global_status_var;
166
 
extern struct rand_struct sql_rand;
167
152
 
168
153
extern Table *unused_tables;
169
154
extern const char* any_db;
170
155
extern struct my_option my_long_options[];
171
 
extern uint8_t uc_update_queries[SQLCOM_END+1];
172
156
extern std::bitset<5> sql_command_flags[];
173
 
extern TYPELIB log_output_typelib;
174
157
 
175
158
extern StorageEngine *myisam_engine;
176
159
extern StorageEngine *heap_engine;
179
162
 
180
163
extern pthread_t signal_thread;
181
164
 
182
 
 
183
165
/* table.cc */
184
166
TableShare *alloc_table_share(TableList *table_list, char *key,
185
167
                               uint32_t key_length);
262
244
#define FN_IS_TMP       (FN_FROM_IS_TMP | FN_TO_IS_TMP)
263
245
#define NO_FRM_RENAME   (1 << 2)
264
246
 
265
 
 
266
 
inline ulong sql_rnd()
 
247
inline uint32_t sql_rnd()
267
248
{
268
 
  ulong tmp= (ulong) (rand() * 0xffffffff); /* make all bits random */
269
 
 
270
 
  return tmp;
 
249
  return (uint32_t) (rand() * 0xffffffff); /* make all bits random */
271
250
}
272
251
 
273
 
 
274
 
 
275
252
/**
276
253
  convert a hex digit into number.
277
254
*/
278
 
 
279
255
inline int hexchar_to_int(char c)
280
256
{
281
257
  if (c <= '9' && c >= '0')
286
262
  return -1;
287
263
}
288
264
 
289
 
 
290
 
#endif /* DRIZZLE_SERVER_SERVER_INCLUDES_H */
 
265
#endif /* DRIZZLED_SERVER_INCLUDES_H */