~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

Merged in fix-headers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
 
21
21
#include <drizzled/server_includes.h>
 
22
 
 
23
#include <netdb.h>
 
24
#include <sys/poll.h>
 
25
#include <netinet/tcp.h>
 
26
#include <signal.h>
 
27
 
22
28
#include <mysys/my_bit.h>
23
 
#include "slave.h"
24
 
#include "rpl_mi.h"
25
 
#include "sql_repl.h"
26
 
#include "rpl_filter.h"
27
 
#include "stacktrace.h"
 
29
#include <drizzled/slave.h>
 
30
#include <drizzled/rpl_mi.h>
 
31
#include <drizzled/sql_repl.h>
 
32
#include <drizzled/rpl_filter.h>
 
33
#include <drizzled/stacktrace.h>
28
34
#include <mysys/mysys_err.h>
29
 
#include <sys/poll.h>
30
 
#include <netinet/tcp.h>
31
35
#include <drizzled/error.h>
32
36
#include <drizzled/tztime.h>
33
37
 
432
436
 
433
437
/* Thread specific variables */
434
438
 
435
 
pthread_key(MEM_ROOT**,THR_MALLOC);
436
 
pthread_key(Session*, THR_Session);
 
439
pthread_key_t THR_MALLOC;
 
440
pthread_key_t THR_Session;
437
441
pthread_mutex_t LOCK_mysql_create_db, LOCK_open, LOCK_thread_count,
438
442
                LOCK_status,
439
443
                LOCK_global_read_lock,
4658
4662
}
4659
4663
 
4660
4664
 
4661
 
/**
4662
 
  Fix filename and replace extension where 'dir' is relative to
4663
 
  mysql_real_data_home.
4664
 
  @return
4665
 
    1 if len(path) > FN_REFLEN
4666
 
*/
4667
 
 
4668
 
bool
4669
 
fn_format_relative_to_data_home(char * to, const char *name,
4670
 
                                const char *dir, const char *extension)
4671
 
{
4672
 
  char tmp_path[FN_REFLEN];
4673
 
  if (!test_if_hard_path(dir))
4674
 
  {
4675
 
    strcpy(tmp_path, mysql_real_data_home);
4676
 
    strncat(tmp_path, dir, sizeof(tmp_path)-strlen(mysql_real_data_home)-1);
4677
 
    dir=tmp_path;
4678
 
  }
4679
 
  return !fn_format(to, name, dir, extension,
4680
 
                    MY_APPEND_EXT | MY_UNPACK_FILENAME | MY_SAFE_PATH);
4681
 
}
4682
 
 
4683
 
 
4684
4665
static void fix_paths(void)
4685
4666
{
4686
4667
  char buff[FN_REFLEN],*pos;