~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Monty Taylor
  • Date: 2009-07-13 17:41:47 UTC
  • mfrom: (1089.9.1 daemonization)
  • mto: This revision was merged to the branch mainline in revision 1096.
  • Revision ID: mordred@inaugust.com-20090713174147-c2chc5kjroc685r0
Merged Jay from lp:~jaypipes/drizzle/for-brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
#include <sys/mman.h>
108
108
#endif
109
109
 
110
 
#define SIGNAL_FMT "signal %d"
111
 
 
112
 
 
113
110
#if defined(__FreeBSD__) && defined(HAVE_IEEEFP_H)
114
111
#include <ieeefp.h>
115
112
#ifdef HAVE_FP_EXCEPT                           // Fix type conflict
126
123
#include <sys/fpu.h>
127
124
#endif
128
125
 
129
 
 
130
126
inline void setup_fpu()
131
127
{
132
128
#if defined(__FreeBSD__) && defined(HAVE_IEEEFP_H)
173
169
/* Constants */
174
170
 
175
171
const char *show_comp_option_name[]= {"YES", "NO", "DISABLED"};
176
 
/*
177
 
  WARNING: When adding new SQL modes don't forget to update the
178
 
           tables definitions that stores it's value.
179
 
           (ie: mysql.event, mysql.proc)
180
 
*/
181
172
static const char *optimizer_switch_names[]=
182
173
{
183
174
  "no_materialization", "no_semijoin",
205
196
  tc_heuristic_recover_names, NULL
206
197
};
207
198
 
208
 
const char *first_keyword= "first", *binary_keyword= "BINARY";
209
 
const char *my_localhost= "localhost";
 
199
const char *first_keyword= "first";
 
200
const char *binary_keyword= "BINARY";
210
201
const char * const DRIZZLE_CONFIG_NAME= "drizzled";
211
202
#define GET_HA_ROWS GET_ULL
212
203
 
226
217
 
227
218
extern TYPELIB optimizer_use_mrr_typelib;
228
219
 
229
 
/* the default log output is log tables */
230
220
static bool volatile select_thread_in_use;
231
221
static bool volatile ready_to_exit;
232
222
static bool opt_debugging= 0;
244
234
 
245
235
/* Global variables */
246
236
 
247
 
bool server_id_supplied = 0;
248
 
bool opt_endinfo, using_udf_functions;
 
237
bool opt_endinfo;
249
238
bool locked_in_memory;
250
239
bool volatile abort_loop;
251
240
bool volatile shutdown_in_progress;
262
251
StorageEngine *myisam_engine;
263
252
 
264
253
char* opt_secure_file_priv= 0;
265
 
/*
266
 
  True if there is at least one per-hour limit for some user, so we should
267
 
  check them before each query (and possibly reset counters when hour is
268
 
  changed). False otherwise.
269
 
*/
270
 
bool opt_noacl;
271
254
 
272
255
#ifdef HAVE_INITGROUPS
273
256
static bool calling_initgroups= false; /**< Used in SIGSEGV handler. */
866
849
  */
867
850
  if (segfaulted)
868
851
  {
869
 
    fprintf(stderr, _("Fatal " SIGNAL_FMT " while backtracing\n"), sig);
 
852
    fprintf(stderr, _("Fatal signal %d while backtracing\n"), sig);
870
853
    exit(1);
871
854
  }
872
855
 
882
865
  localtime_r(&curr_time, &tm);
883
866
  Scheduler &thread_scheduler= get_thread_scheduler();
884
867
  
885
 
  fprintf(stderr,"%02d%02d%02d %2d:%02d:%02d - drizzled got "
886
 
          SIGNAL_FMT " ;\n"
 
868
  fprintf(stderr,"%02d%02d%02d %2d:%02d:%02d - drizzled got signal %d;\n"
887
869
          "This could be because you hit a bug. It is also possible that "
888
870
          "this binary\n or one of the libraries it was linked against is "
889
871
          "corrupt, improperly built,\n or misconfigured. This error can "
1402
1384
  if (ha_init_errors())
1403
1385
    return(1);
1404
1386
 
1405
 
  if (plugin_init(&defaults_argc, defaults_argv,
1406
 
                  (opt_noacl ? PLUGIN_INIT_SKIP_PLUGIN_TABLE : 0) |
1407
 
                  (opt_help ? PLUGIN_INIT_SKIP_INITIALIZATION : 0)))
 
1387
  if (plugin_init(&defaults_argc, defaults_argv, (opt_help ? PLUGIN_INIT_SKIP_INITIALIZATION : 0)))
1408
1388
  {
1409
 
      errmsg_printf(ERRMSG_LVL_ERROR, _("Failed to initialize plugins."));
 
1389
    errmsg_printf(ERRMSG_LVL_ERROR, _("Failed to initialize plugins."));
1410
1390
    unireg_abort(1);
1411
1391
  }
1412
1392
 
2408
2388
  cleanup_done= 0;
2409
2389
  defaults_argc= 0;
2410
2390
  defaults_argv= 0;
2411
 
  server_id_supplied= 0;
2412
2391
  dropping_tables= ha_open_options=0;
2413
2392
  test_flags.reset();
2414
2393
  wake_thread=0;
2415
 
  opt_endinfo= using_udf_functions= 0;
 
2394
  opt_endinfo= false;
2416
2395
  abort_loop= select_thread_in_use= false;
2417
2396
  ready_to_exit= shutdown_in_progress= 0;
2418
2397
  aborted_threads= aborted_connects= 0;
2578
2557
    strncpy(pidfile_name, argument, sizeof(pidfile_name)-1);
2579
2558
    break;
2580
2559
  case OPT_SERVER_ID:
2581
 
    server_id_supplied = 1;
2582
2560
    break;
2583
2561
  case OPT_DELAY_KEY_WRITE_ALL:
2584
2562
    if (argument != disabled_my_option)
2847
2825
 
2848
2826
#ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
2849
2827
/* Used templates */
2850
 
template class I_List<Session>;
2851
 
template class I_List_iterator<Session>;
2852
2828
template class I_List<i_string>;
2853
2829
template class I_List<i_string_pair>;
2854
2830
template class I_List<NAMED_LIST>;