~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: LinuxJedi
  • Date: 2010-09-02 15:42:57 UTC
  • mto: (1747.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1748.
  • Revision ID: linuxjedi@linuxjedi-laptop-20100902154257-ez7kd3ajov745o45
Make sure unireg_abort shows the reason for the fail.

Show diffs side-by-side

added added

removed removed

Lines of Context:
593
593
  initgroups((char*) user, user_info_arg->pw_gid);
594
594
  if (setgid(user_info_arg->pw_gid) == -1)
595
595
  {
596
 
    sql_perror("setgid");
 
596
    sql_perror(N_("Set process group ID failed"));
597
597
    unireg_abort(1);
598
598
  }
599
599
  if (setuid(user_info_arg->pw_uid) == -1)
600
600
  {
601
 
    sql_perror("setuid");
 
601
    sql_perror(N_("Set process user ID failed"));
602
602
    unireg_abort(1);
603
603
  }
604
604
}
610
610
{
611
611
  if ((chroot(path) == -1) || !chdir("/"))
612
612
  {
613
 
    sql_perror("chroot");
 
613
    sql_perror(N_("Process chroot failed"));
614
614
    unireg_abort(1);
615
615
  }
616
616
}
734
734
  if (!(default_charset_info=
735
735
        get_charset_by_csname(default_character_set_name, MY_CS_PRIMARY)))
736
736
  {
 
737
    errmsg_printf(ERRMSG_LVL_ERROR, _("Error getting default charset"));
737
738
    return 1;                           // Eof of the list
738
739
  }
739
740
 
759
760
 
760
761
  if (not (character_set_filesystem=
761
762
           get_charset_by_csname(character_set_filesystem_name, MY_CS_PRIMARY)))
 
763
  {
 
764
    errmsg_printf(ERRMSG_LVL_ERROR, _("Error setting collation"));
762
765
    return 1;
 
766
  }
763
767
  global_system_variables.character_set_filesystem= character_set_filesystem;
764
768
 
765
769
  if (!(my_default_lc_time_names=
851
855
    all things are initialized so that unireg_abort() doesn't fail
852
856
  */
853
857
  if (table_cache_init())
 
858
  {
 
859
    errmsg_printf(ERRMSG_LVL_ERROR, _("Could not initialize table cache\n"));
854
860
    unireg_abort(1);
 
861
  }
855
862
  TableShare::cacheStart();
856
863
 
857
864
  setup_fpu();
860
867
 
861
868
  if (xid_cache_init())
862
869
  {
863
 
      errmsg_printf(ERRMSG_LVL_ERROR, _("Out of memory"));
 
870
    errmsg_printf(ERRMSG_LVL_ERROR, _("XA cache initialization failed: Out of memory\n"));
864
871
    unireg_abort(1);
865
872
  }
866
873
 
869
876
 
870
877
  if (plugin_init(plugins, &defaults_argc, defaults_argv, long_options))
871
878
  {
872
 
    errmsg_printf(ERRMSG_LVL_ERROR, _("Failed to initialize plugins."));
 
879
    errmsg_printf(ERRMSG_LVL_ERROR, _("Failed to initialize plugins\n"));
873
880
    unireg_abort(1);
874
881
  }
875
882
 
890
897
    exception here */
891
898
  if (unknown_options.size() > 0)
892
899
  {
893
 
     fprintf(stderr,
894
 
            _("%s: Too many arguments (first extra is '%s').\n"
 
900
     errmsg_printf(ERRMSG_LVL_ERROR,
 
901
            _("%s: Unknown options give (first unknown is '%s').\n"
895
902
              "Use --verbose --help to get a list of available options\n"),
896
903
            internal::my_progname, unknown_options[0].c_str());
897
904
      unireg_abort(1);
940
947
    engine= plugin::StorageEngine::findByName(name);
941
948
    if (engine == NULL)
942
949
    {
943
 
      errmsg_printf(ERRMSG_LVL_ERROR, _("Unknown/unsupported storage engine: %s"),
 
950
      errmsg_printf(ERRMSG_LVL_ERROR, _("Unknown/unsupported storage engine: %s\n"),
944
951
                    default_storage_engine_str);
945
952
      unireg_abort(1);
946
953
    }
949
956
 
950
957
  if (plugin::XaResourceManager::recoverAllXids())
951
958
  {
 
959
    /* This function alredy generates error messages */
952
960
    unireg_abort(1);
953
961
  }
954
962