~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: lbieber
  • Date: 2010-09-07 22:29:56 UTC
  • mfrom: (1747.1.3 build)
  • Revision ID: lbieber@orisndriz03-20100907222956-d60u695b7hx3zs0d
Merge Andrew - bug 597778 - Timestamp cannot reliably store leap seconds, so don't try. Leave that to datetime only
Merge Andrew - bug 621862 - Add / clean-up error messages for unireg_abort
Merge Andrew - bug 629563 - Drop the broken --mysql options and Change the --protocol option to accept 'mysql' or 'drizzle' ('mysql' currently default)

Show diffs side-by-side

added added

removed removed

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