~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Brian Aker
  • Date: 2009-03-03 18:50:34 UTC
  • mfrom: (908.1.17 mordred)
  • Revision ID: brian@tangent.org-20090303185034-obr7tiwx8vyn0i7j
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
468
468
 
469
469
static void usage(void);
470
470
static void clean_up_mutexes(void);
471
 
static void drizzled_exit(int exit_code) __attribute__((noreturn));
472
471
extern "C" bool safe_read_error_impl(NET *net);
473
472
 
474
473
/****************************************************************************
620
619
  else if (opt_help)
621
620
    usage();
622
621
  clean_up(!opt_help && (exit_code)); /* purecov: inspected */
623
 
  drizzled_exit(exit_code);
624
 
}
625
 
 
626
 
 
627
 
static void drizzled_exit(int exit_code)
628
 
{
629
622
  clean_up_mutexes();
630
623
  my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
631
624
  exit(exit_code); /* purecov: inspected */
759
752
      errmsg_printf(ERRMSG_LVL_ERROR, _("Fatal error: Please read \"Security\" section of "
760
753
                      "the manual to find out how to run drizzled as root!\n"));
761
754
    unireg_abort(1);
762
 
 
763
 
    return NULL;
764
755
  }
765
756
  /* purecov: begin tested */
766
757
  if (!strcmp(user,"root"))
792
783
  }
793
784
#endif
794
785
 
 
786
/* Sun Studio 5.10 doesn't like this line.  5.9 requires it */
 
787
#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x590)
795
788
  return NULL;
 
789
#endif
 
790
 
796
791
}
797
792
 
798
793
static void set_user(const char *user, struct passwd *user_info_arg)
1696
1691
    }
1697
1692
    if (!ha_storage_engine_is_enabled(hton))
1698
1693
    {
1699
 
          errmsg_printf(ERRMSG_LVL_ERROR, _("Default storage engine (%s) is not available"),
1700
 
                      default_storage_engine_str);
 
1694
      errmsg_printf(ERRMSG_LVL_ERROR, _("Default storage engine (%s) is not available"),
 
1695
                    default_storage_engine_str);
1701
1696
      unireg_abort(1);
1702
 
      assert(global_system_variables.table_plugin);
 
1697
      //assert(global_system_variables.table_plugin);
1703
1698
    }
1704
1699
    else
1705
1700
    {
1880
1875
  (void) pthread_mutex_unlock(&LOCK_thread_count);
1881
1876
 
1882
1877
  clean_up(1);
1883
 
  drizzled_exit(0);
 
1878
  clean_up_mutexes();
 
1879
  my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
 
1880
  return 0;
1884
1881
}
1885
1882
 
1886
1883