~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

Merged fix-headers work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
#include <drizzled/db.h>
45
45
#include <drizzled/item/create.h>
46
46
#include <drizzled/errmsg.h>
 
47
#include <drizzled/unireg.h>
47
48
 
48
49
 
49
50
#if TIME_WITH_SYS_TIME
427
428
 
428
429
/* Thread specific variables */
429
430
 
430
 
pthread_key_t THR_MALLOC;
 
431
pthread_key_t THR_Mem_root;
431
432
pthread_key_t THR_Session;
432
433
pthread_mutex_t LOCK_drizzle_create_db, LOCK_open, LOCK_thread_count,
433
434
                LOCK_status,
735
736
    alarm(2);                                   /* reschedule alarm */
736
737
}
737
738
 
 
739
 
 
740
void unireg_init()
 
741
{
 
742
  abort_loop=0;
 
743
 
 
744
  my_disable_async_io=1;                /* aioread is only in shared library */
 
745
  wild_many='%'; wild_one='_'; wild_prefix='\\'; /* Change to sql syntax */
 
746
 
 
747
  current_pid=(ulong) getpid();         /* Save for later ref */
 
748
  init_time();                          /* Init time-functions (read zone) */
 
749
  my_abort_hook=unireg_abort;           /* Abort with close of databases */
 
750
 
 
751
  strcpy(reg_ext,".frm");
 
752
  reg_ext_length= 4;
 
753
 
 
754
  return;
 
755
}
 
756
 
 
757
 
738
758
/**
739
759
  cleanup all memory and end program nicely.
740
760
 
1926
1946
    }
1927
1947
    open_files_limit= files;
1928
1948
  }
1929
 
  unireg_init(0); /* Set up extern variabels */
 
1949
  unireg_init(); /* Set up extern variabels */
1930
1950
  if (init_errmessage())        /* Read error messages from file */
1931
1951
    return 1;
1932
1952
  lex_init();
2069
2089
  }
2070
2090
 
2071
2091
  if (pthread_key_create(&THR_Session,NULL) ||
2072
 
      pthread_key_create(&THR_MALLOC,NULL))
 
2092
      pthread_key_create(&THR_Mem_root,NULL))
2073
2093
  {
2074
2094
    sql_print_error(_("Can't create thread-keys"));
2075
2095
    return 1;