~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/common_includes.h

  • Committer: Monty Taylor
  • Date: 2008-10-22 01:52:54 UTC
  • Revision ID: monty@inaugust.com-20081022015254-65qfk9f2v0b8jlk3
Moved drizzle_com to drizzled/drizzle_common. Started splitting it up.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
/* Network database operations (hostent, netent, servent, etc...*/
70
70
#include <netdb.h>
71
71
/* Definitions that the client and the server have in common */
72
 
#include <libdrizzle/drizzle_com.h>
 
72
#include <drizzled/drizzle_common.h>
73
73
/* gettext() convenience wrappers */
74
 
#include <libdrizzle/gettext.h>
 
74
#include <drizzled/gettext.h>
75
75
/* Contains system-wide constants and #defines */
76
76
#include <drizzled/definitions.h>
77
77
/* System-wide common data structures */
251
251
class TableList;
252
252
class String;
253
253
class Table;
254
 
class THD;
 
254
class Session;
255
255
class user_var_entry;
256
256
class Security_context;
257
257
 
258
 
#define thd_proc_info(thd, msg)  set_thd_proc_info(thd, msg, __func__, __FILE__, __LINE__)
259
 
 
260
 
extern pthread_key(THD*, THR_THD);
261
 
inline THD *_current_thd(void)
 
258
extern pthread_key(Session*, THR_Session);
 
259
inline Session *_current_session(void)
262
260
{
263
 
  return (THD *)pthread_getspecific(THR_THD);
 
261
  return (Session *)pthread_getspecific(THR_Session);
264
262
}
265
 
#define current_thd _current_thd()
 
263
#define current_session _current_session()
266
264
 
267
 
/** 
268
 
  The meat of thd_proc_info(THD*, char*), a macro that packs the last
269
 
  three calling-info parameters. 
270
 
*/
271
 
extern "C"
272
 
const char *set_thd_proc_info(THD *thd, const char *info, 
273
 
                              const char *calling_func, 
274
 
                              const char *calling_file, 
275
 
                              const unsigned int calling_line);
 
265
extern "C" void set_session_proc_info(Session *session, const char *info);
 
266
extern "C" const char *get_session_proc_info(Session *session);
276
267
 
277
268
/*
278
269
  External variables
295
286
extern my_decimal decimal_zero;
296
287
 
297
288
/** @TODO Find a good header to put this guy... */
298
 
void close_thread_tables(THD *thd);
 
289
void close_thread_tables(Session *session);
299
290
 
300
291
#include <drizzled/sql_parse.h>
301
292
 
317
308
 * InnoDB?  Or does the InnoDB plugin already fix this stuff?
318
309
 */
319
310
#if defined DRIZZLE_SERVER || defined INNODB_COMPATIBILITY_HOOKS
320
 
bool check_global_access(THD *thd, ulong want_access);
321
 
int get_quote_char_for_identifier(THD *thd, const char *name, uint32_t length);
 
311
bool check_global_access(Session *session, ulong want_access);
 
312
int get_quote_char_for_identifier(Session *session, const char *name, uint32_t length);
322
313
extern struct system_variables global_system_variables;
323
314
extern uint32_t mysql_data_home_len;
324
315
extern char *mysql_data_home,server_version[SERVER_VERSION_LENGTH],