~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Brian Aker
  • Date: 2009-07-11 08:51:36 UTC
  • mfrom: (1089.3.11 merge)
  • Revision ID: brian@gaz-20090711085136-qj01nwm3qynghwtc
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
280
280
uint32_t drizzled_tcp_port;
281
281
 
282
282
uint32_t drizzled_port_timeout;
283
 
uint32_t test_flags, dropping_tables, ha_open_options;
 
283
std::bitset<12> test_flags;
 
284
uint32_t dropping_tables, ha_open_options;
284
285
uint32_t delay_key_write_options;
285
286
uint32_t tc_heuristic_recover= 0;
286
287
uint64_t session_startup_options;
712
713
  unireg_abort(1);
713
714
 
714
715
#ifdef PR_SET_DUMPABLE
715
 
  if (test_flags & TEST_CORE_ON_SIGNAL)
 
716
  if (test_flags.test(TEST_CORE_ON_SIGNAL))
716
717
  {
717
718
    /* inform kernel that process is dumpable */
718
719
    (void) prctl(PR_SET_DUMPABLE, 1);
915
916
#ifdef HAVE_STACKTRACE
916
917
  Session *session= current_session;
917
918
 
918
 
  if (!(test_flags & TEST_NO_STACKTRACE))
 
919
  if (! (test_flags.test(TEST_NO_STACKTRACE)))
919
920
  {
920
921
    fprintf(stderr,"session: 0x%lx\n",(long) session);
921
922
    fprintf(stderr,_("Attempting backtrace. You can use the following "
999
1000
  }
1000
1001
 
1001
1002
#ifdef HAVE_WRITE_CORE
1002
 
  if (test_flags & TEST_CORE_ON_SIGNAL)
 
1003
  if (test_flags.test(TEST_CORE_ON_SIGNAL))
1003
1004
  {
1004
1005
    fprintf(stderr, _("Writing a core file\n"));
1005
1006
    fflush(stderr);
1022
1023
  sigset_t set;
1023
1024
  struct sigaction sa;
1024
1025
 
1025
 
  if (!(test_flags & TEST_NO_STACKTRACE) || (test_flags & TEST_CORE_ON_SIGNAL))
 
1026
  if (!(test_flags.test(TEST_NO_STACKTRACE) || 
 
1027
        test_flags.test(TEST_CORE_ON_SIGNAL)))
1026
1028
  {
1027
1029
    sa.sa_flags = SA_RESETHAND | SA_NODEFER;
1028
1030
    sigemptyset(&sa.sa_mask);
1040
1042
  }
1041
1043
 
1042
1044
#ifdef HAVE_GETRLIMIT
1043
 
  if (test_flags & TEST_CORE_ON_SIGNAL)
 
1045
  if (test_flags.test(TEST_CORE_ON_SIGNAL))
1044
1046
  {
1045
1047
    /* Change limits so that we will get a core file */
1046
1048
    struct rlimit rl;
1071
1073
#ifdef SIGTSTP
1072
1074
  sigaddset(&set,SIGTSTP);
1073
1075
#endif
1074
 
  if (test_flags & TEST_SIGINT)
 
1076
  if (test_flags.test(TEST_SIGINT))
1075
1077
  {
1076
1078
    my_sigset(thr_kill_signal, end_thread_signal);
1077
1079
    // May be SIGINT
2407
2409
  defaults_argc= 0;
2408
2410
  defaults_argv= 0;
2409
2411
  server_id_supplied= 0;
2410
 
  test_flags= dropping_tables= ha_open_options=0;
 
2412
  dropping_tables= ha_open_options=0;
 
2413
  test_flags.reset();
2411
2414
  wake_thread=0;
2412
2415
  opt_endinfo= using_udf_functions= 0;
2413
2416
  abort_loop= select_thread_in_use= false;
2533
2536
      global_system_variables.log_warnings= atoi(argument);
2534
2537
    break;
2535
2538
  case 'T':
2536
 
    test_flags= argument ? (uint32_t) atoi(argument) : 0;
 
2539
    if (argument)
 
2540
    {
 
2541
      test_flags.set((uint32_t) atoi(argument));
 
2542
    }
2537
2543
    opt_endinfo=1;
2538
2544
    break;
2539
2545
  case (int) OPT_WANT_CORE:
2540
 
    test_flags |= TEST_CORE_ON_SIGNAL;
 
2546
    test_flags.set(TEST_CORE_ON_SIGNAL);
2541
2547
    break;
2542
2548
  case (int) OPT_SKIP_STACK_TRACE:
2543
 
    test_flags|=TEST_NO_STACKTRACE;
 
2549
    test_flags.set(TEST_NO_STACKTRACE);
2544
2550
    break;
2545
2551
  case (int) OPT_SKIP_SYMLINKS:
2546
2552
    my_use_symdir=0;
2721
2727
  if (opt_debugging)
2722
2728
  {
2723
2729
    /* Allow break with SIGINT, no core or stack trace */
2724
 
    test_flags|= TEST_SIGINT | TEST_NO_STACKTRACE;
2725
 
    test_flags&= ~TEST_CORE_ON_SIGNAL;
 
2730
    test_flags.set(TEST_SIGINT);
 
2731
    test_flags.set(TEST_NO_STACKTRACE);
 
2732
    test_flags.reset(TEST_CORE_ON_SIGNAL);
2726
2733
  }
2727
2734
  /* Set global MyISAM variables from delay_key_write_options */
2728
2735
  fix_delay_key_write((Session*) 0, OPT_GLOBAL);