~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/server_includes.h

  • Committer: Monty Taylor
  • Date: 2008-12-10 07:43:50 UTC
  • mto: (670.1.3 devel)
  • mto: This revision was merged to the branch mainline in revision 672.
  • Revision ID: monty@inaugust.com-20081210074350-wi2y2piv23ko707h
Removed more stuff from the headers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
static const std::string INFORMATION_SCHEMA_NAME("information_schema");
72
72
 
73
73
 
74
 
#define is_schema_db(X) \
75
 
  !my_strcasecmp(system_charset_info, INFORMATION_SCHEMA_NAME.str, (X))
76
 
 
77
 
/* sql_test.cc */
78
 
void print_where(COND *cond,const char *info, enum_query_type query_type);
79
 
void print_cached_tables(void);
80
 
void print_plan(JOIN* join,uint32_t idx, double record_count, double read_time,
81
 
                double current_read_time, const char *info);
82
 
void print_keyuse_array(DYNAMIC_ARRAY *keyuse_array);
83
 
void dump_TableList_graph(SELECT_LEX *select_lex, TableList* tl);
84
 
void mysql_print_status();
85
 
 
86
 
 
87
 
bool init_errmessage(void);
88
 
File open_binlog(IO_CACHE *log, const char *log_file_name,
89
 
                 const char **errmsg);
90
74
 
91
75
/* mysqld.cc */
92
76
void refresh_status(Session *session);
121
105
  External variables
122
106
*/
123
107
 
124
 
extern time_t server_start_time, flush_status_time;
125
 
extern char *opt_drizzle_tmpdir;
126
 
 
127
108
#define drizzle_tmpdir (my_tmpdir(&drizzle_tmpdir_list))
128
109
extern MY_TMPDIR drizzle_tmpdir_list;
129
110
extern const LEX_STRING command_name[];
258
239
 
259
240
extern pthread_t signal_thread;
260
241
 
261
 
DRIZZLE_LOCK *mysql_lock_tables(Session *session, Table **table, uint32_t count,
262
 
                              uint32_t flags, bool *need_reopen);
263
 
/* mysql_lock_tables() and open_table() flags bits */
264
 
#define DRIZZLE_LOCK_IGNORE_GLOBAL_READ_LOCK      0x0001
265
 
#define DRIZZLE_LOCK_IGNORE_FLUSH                 0x0002
266
 
#define DRIZZLE_LOCK_NOTIFY_IF_NEED_REOPEN        0x0004
267
 
#define DRIZZLE_OPEN_TEMPORARY_ONLY               0x0008
268
 
#define DRIZZLE_LOCK_IGNORE_GLOBAL_READ_ONLY      0x0010
269
 
#define DRIZZLE_LOCK_PERF_SCHEMA                  0x0020
270
 
 
271
 
void mysql_unlock_tables(Session *session, DRIZZLE_LOCK *sql_lock);
272
 
void mysql_unlock_read_tables(Session *session, DRIZZLE_LOCK *sql_lock);
273
 
void mysql_unlock_some_tables(Session *session, Table **table,uint32_t count);
274
 
void mysql_lock_remove(Session *session, DRIZZLE_LOCK *locked,Table *table,
275
 
                       bool always_unlock);
276
 
void mysql_lock_abort(Session *session, Table *table, bool upgrade_lock);
277
 
void mysql_lock_downgrade_write(Session *session, Table *table,
278
 
                                thr_lock_type new_lock_type);
279
 
bool mysql_lock_abort_for_thread(Session *session, Table *table);
280
 
DRIZZLE_LOCK *mysql_lock_merge(DRIZZLE_LOCK *a,DRIZZLE_LOCK *b);
281
 
TableList *mysql_lock_have_duplicate(Session *session, TableList *needle,
282
 
                                      TableList *haystack);
283
 
bool lock_global_read_lock(Session *session);
284
 
void unlock_global_read_lock(Session *session);
285
 
bool wait_if_global_read_lock(Session *session, bool abort_on_refresh,
286
 
                              bool is_not_commit);
287
 
void start_waiting_global_read_lock(Session *session);
288
 
bool make_global_read_lock_block_commit(Session *session);
289
 
bool set_protect_against_global_read_lock(void);
290
 
void unset_protect_against_global_read_lock(void);
291
 
void broadcast_refresh(void);
292
 
int try_transactional_lock(Session *session, TableList *table_list);
293
 
int check_transactional_lock(Session *session, TableList *table_list);
294
 
int set_handler_table_locks(Session *session, TableList *table_list,
295
 
                            bool transactional);
296
 
 
297
 
/* Lock based on name */
298
 
int lock_and_wait_for_table_name(Session *session, TableList *table_list);
299
 
int lock_table_name(Session *session, TableList *table_list, bool check_in_use);
300
 
void unlock_table_name(Session *session, TableList *table_list);
301
 
bool wait_for_locked_table_names(Session *session, TableList *table_list);
302
 
bool lock_table_names(Session *session, TableList *table_list);
303
 
void unlock_table_names(Session *session, TableList *table_list,
304
 
                        TableList *last_table);
305
 
bool lock_table_names_exclusively(Session *session, TableList *table_list);
306
 
bool is_table_name_exclusively_locked_by_this_thread(Session *session,
307
 
                                                     TableList *table_list);
308
 
bool is_table_name_exclusively_locked_by_this_thread(Session *session, unsigned char *key,
309
 
                                                     int key_length);
310
 
 
311
 
 
312
 
/* old unireg functions */
313
 
 
314
 
void unireg_init(ulong options);
315
 
void unireg_end(void) __attribute__((noreturn));
316
 
bool mysql_create_frm(Session *session, const char *file_name,
317
 
                      const char *db, const char *table,
318
 
                      HA_CREATE_INFO *create_info,
319
 
                      List<Create_field> &create_field,
320
 
                      uint32_t key_count,KEY *key_info,handler *db_type);
321
 
int rea_create_table(Session *session, const char *path,
322
 
                     const char *db, const char *table_name,
323
 
                     HA_CREATE_INFO *create_info,
324
 
                     List<Create_field> &create_field,
325
 
                     uint32_t key_count,KEY *key_info,
326
 
                     handler *file);
327
 
int format_number(uint32_t inputflag,uint32_t max_length,char * pos,uint32_t length,
328
 
                  char * *errpos);
329
242
 
330
243
/* table.cc */
331
244
TABLE_SHARE *alloc_table_share(TableList *table_list, char *key,
438
351
#define FN_IS_TMP       (FN_FROM_IS_TMP | FN_TO_IS_TMP)
439
352
#define NO_FRM_RENAME   (1 << 2)
440
353
 
441
 
/* item_func.cc */
442
 
Item *get_system_var(Session *session, enum_var_type var_type, LEX_STRING name,
443
 
                     LEX_STRING component);
444
 
int get_var_with_binlog(Session *session, enum_sql_command sql_command,
445
 
                        LEX_STRING &name, user_var_entry **out_entry);
446
 
/* log.cc */
447
 
bool flush_error_log(void);
448
 
 
449
354
 
450
355
inline ulong sql_rnd()
451
356
{
470
375
  return -1;
471
376
}
472
377
 
473
 
/*
474
 
  Some functions that are different in the embedded library and the normal
475
 
  server
476
 
*/
477
 
 
478
 
extern "C" void unireg_abort(int exit_code) __attribute__((noreturn));
479
 
bool check_stack_overrun(Session *session, long margin, unsigned char *dummy);
480
378
 
481
379
#endif /* DRIZZLE_SERVER_SERVER_INCLUDES_H */