~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Brian Aker
  • Date: 2011-01-02 05:13:03 UTC
  • mfrom: (2044.1.1 trunk-bug-628397)
  • Revision ID: brian@tangent.org-20110102051303-boac41qa2g1myorm
MErge in Andrew's patch for a mysql bug

Show diffs side-by-side

added added

removed removed

Lines of Context:
394
394
  return vm;
395
395
}
396
396
 
397
 
fs::path& getFullDataHome()
398
 
{
399
 
  return full_data_home;
400
 
}
401
 
 
402
397
fs::path& getDataHome()
403
398
{
404
399
  return data_home;
602
597
  initgroups((char*) user, user_info_arg->pw_gid);
603
598
  if (setgid(user_info_arg->pw_gid) == -1)
604
599
  {
605
 
    sql_perror(_("Set process group ID failed"));
 
600
    sql_perror(N_("Set process group ID failed"));
606
601
    unireg_abort(1);
607
602
  }
608
603
  if (setuid(user_info_arg->pw_uid) == -1)
609
604
  {
610
 
    sql_perror(_("Set process user ID failed"));
 
605
    sql_perror(N_("Set process user ID failed"));
611
606
    unireg_abort(1);
612
607
  }
613
608
}
619
614
{
620
615
  if ((chroot(path) == -1) || !chdir("/"))
621
616
  {
622
 
    sql_perror(_("Process chroot failed"));
 
617
    sql_perror(N_("Process chroot failed"));
623
618
    unireg_abort(1);
624
619
  }
625
620
}
739
734
  global_system_variables.auto_increment_increment= 1;
740
735
  if (in_auto_increment_increment < 1 || in_auto_increment_increment > UINT64_MAX)
741
736
  {
742
 
    cout << _("Error: Invalid Value for auto_increment_increment");
 
737
    cout << N_("Error: Invalid Value for auto_increment_increment");
743
738
    exit(-1);
744
739
  }
745
740
  global_system_variables.auto_increment_increment= in_auto_increment_increment;
750
745
  global_system_variables.auto_increment_offset= 1;
751
746
  if (in_auto_increment_offset < 1 || in_auto_increment_offset > UINT64_MAX)
752
747
  {
753
 
    cout << _("Error: Invalid Value for auto_increment_offset");
 
748
    cout << N_("Error: Invalid Value for auto_increment_offset");
754
749
    exit(-1);
755
750
  }
756
751
  global_system_variables.auto_increment_offset= in_auto_increment_offset;
761
756
  global_system_variables.completion_type= 0;
762
757
  if (in_completion_type > 2)
763
758
  {
764
 
    cout << _("Error: Invalid Value for completion_type");
 
759
    cout << N_("Error: Invalid Value for completion_type");
765
760
    exit(-1);
766
761
  }
767
762
  global_system_variables.completion_type= in_completion_type;
773
768
  global_system_variables.div_precincrement= 4;
774
769
  if (in_div_precincrement > DECIMAL_MAX_SCALE)
775
770
  {
776
 
    cout << _("Error: Invalid Value for div-precision-increment");
 
771
    cout << N_("Error: Invalid Value for div-precision-increment");
777
772
    exit(-1);
778
773
  }
779
774
  global_system_variables.div_precincrement= in_div_precincrement;
784
779
  global_system_variables.group_concat_max_len= 1024;
785
780
  if (in_group_concat_max_len > ULONG_MAX || in_group_concat_max_len < 4)
786
781
  {
787
 
    cout << _("Error: Invalid Value for group_concat_max_len");
 
782
    cout << N_("Error: Invalid Value for group_concat_max_len");
788
783
    exit(-1);
789
784
  }
790
785
  global_system_variables.group_concat_max_len= in_group_concat_max_len;
795
790
  global_system_variables.join_buff_size= (128*1024L);
796
791
  if (in_join_buffer_size < IO_SIZE*2 || in_join_buffer_size > ULONG_MAX)
797
792
  {
798
 
    cout << _("Error: Invalid Value for join_buffer_size");
 
793
    cout << N_("Error: Invalid Value for join_buffer_size");
799
794
    exit(-1);
800
795
  }
801
796
  in_join_buffer_size-= in_join_buffer_size % IO_SIZE;
807
802
  global_system_variables.max_allowed_packet= (64*1024*1024L);
808
803
  if (in_max_allowed_packet < 1024 || in_max_allowed_packet > 1024*1024L*1024L)
809
804
  {
810
 
    cout << _("Error: Invalid Value for max_allowed_packet");
 
805
    cout << N_("Error: Invalid Value for max_allowed_packet");
811
806
    exit(-1);
812
807
  }
813
808
  in_max_allowed_packet-= in_max_allowed_packet % 1024;
819
814
  max_connect_errors= MAX_CONNECT_ERRORS;
820
815
  if (in_max_connect_errors < 1 || in_max_connect_errors > ULONG_MAX)
821
816
  {
822
 
    cout << _("Error: Invalid Value for max_connect_errors");
 
817
    cout << N_("Error: Invalid Value for max_connect_errors");
823
818
    exit(-1);
824
819
  }
825
820
  max_connect_errors= in_max_connect_errors;
830
825
  global_system_variables.max_error_count= DEFAULT_ERROR_COUNT;
831
826
  if (in_max_error_count > 65535)
832
827
  {
833
 
    cout << _("Error: Invalid Value for max_error_count");
 
828
    cout << N_("Error: Invalid Value for max_error_count");
834
829
    exit(-1);
835
830
  }
836
831
  global_system_variables.max_error_count= in_max_error_count;
841
836
  global_system_variables.max_heap_table_size= (16*1024*1024L);
842
837
  if (in_max_heap_table_size < 16384 || in_max_heap_table_size > MAX_MEM_TABLE_SIZE)
843
838
  {
844
 
    cout << _("Error: Invalid Value for max_heap_table_size");
 
839
    cout << N_("Error: Invalid Value for max_heap_table_size");
845
840
    exit(-1);
846
841
  }
847
842
  in_max_heap_table_size-= in_max_heap_table_size % 1024;
853
848
  global_system_variables.min_examined_row_limit= 0;
854
849
  if (in_min_examined_row_limit > ULONG_MAX)
855
850
  {
856
 
    cout << _("Error: Invalid Value for min_examined_row_limit");
 
851
    cout << N_("Error: Invalid Value for min_examined_row_limit");
857
852
    exit(-1);
858
853
  }
859
854
  global_system_variables.min_examined_row_limit= in_min_examined_row_limit;
864
859
  global_system_variables.max_join_size= INT32_MAX;
865
860
  if ((uint64_t)in_max_join_size < 1 || (uint64_t)in_max_join_size > INT32_MAX)
866
861
  {
867
 
    cout << _("Error: Invalid Value for max_join_size");
 
862
    cout << N_("Error: Invalid Value for max_join_size");
868
863
    exit(-1);
869
864
  }
870
865
  global_system_variables.max_join_size= in_max_join_size;
875
870
  global_system_variables.max_length_for_sort_data= 1024;
876
871
  if (in_max_length_for_sort_data < 4 || in_max_length_for_sort_data > 8192*1024L)
877
872
  {
878
 
    cout << _("Error: Invalid Value for max_length_for_sort_data");
 
873
    cout << N_("Error: Invalid Value for max_length_for_sort_data");
879
874
    exit(-1);
880
875
  }
881
876
  global_system_variables.max_length_for_sort_data= in_max_length_for_sort_data;
886
881
  global_system_variables.max_seeks_for_key= ULONG_MAX;
887
882
  if (in_max_seeks_for_key < 1 || in_max_seeks_for_key > ULONG_MAX)
888
883
  {
889
 
    cout << _("Error: Invalid Value for max_seeks_for_key");
 
884
    cout << N_("Error: Invalid Value for max_seeks_for_key");
890
885
    exit(-1);
891
886
  }
892
887
  global_system_variables.max_seeks_for_key= in_max_seeks_for_key;
897
892
  global_system_variables.max_sort_length= 1024;
898
893
  if ((int64_t)in_max_sort_length < 4 || (int64_t)in_max_sort_length > 8192*1024L)
899
894
  {
900
 
    cout << _("Error: Invalid Value for max_sort_length");
 
895
    cout << N_("Error: Invalid Value for max_sort_length");
901
896
    exit(-1);
902
897
  }
903
898
  global_system_variables.max_sort_length= in_max_sort_length;
908
903
  global_system_variables.optimizer_search_depth= 0;
909
904
  if (in_optimizer_search_depth > MAX_TABLES + 2)
910
905
  {
911
 
    cout << _("Error: Invalid Value for optimizer_search_depth");
 
906
    cout << N_("Error: Invalid Value for optimizer_search_depth");
912
907
    exit(-1);
913
908
  }
914
909
  global_system_variables.optimizer_search_depth= in_optimizer_search_depth;
919
914
  global_system_variables.preload_buff_size= (32*1024L);
920
915
  if (in_preload_buff_size < 1024 || in_preload_buff_size > 1024*1024*1024L)
921
916
  {
922
 
    cout << _("Error: Invalid Value for preload_buff_size");
 
917
    cout << N_("Error: Invalid Value for preload_buff_size");
923
918
    exit(-1);
924
919
  }
925
920
  global_system_variables.preload_buff_size= in_preload_buff_size;
930
925
  global_system_variables.query_alloc_block_size= QUERY_ALLOC_BLOCK_SIZE;
931
926
  if (in_query_alloc_block_size < 1024)
932
927
  {
933
 
    cout << _("Error: Invalid Value for query_alloc_block_size");
 
928
    cout << N_("Error: Invalid Value for query_alloc_block_size");
934
929
    exit(-1);
935
930
  }
936
931
  in_query_alloc_block_size-= in_query_alloc_block_size % 1024;
942
937
  global_system_variables.query_prealloc_size= QUERY_ALLOC_PREALLOC_SIZE;
943
938
  if (in_query_prealloc_size < QUERY_ALLOC_PREALLOC_SIZE)
944
939
  {
945
 
    cout << _("Error: Invalid Value for query_prealloc_size");
 
940
    cout << N_("Error: Invalid Value for query_prealloc_size");
946
941
    exit(-1);
947
942
  }
948
943
  in_query_prealloc_size-= in_query_prealloc_size % 1024;
954
949
  global_system_variables.range_alloc_block_size= RANGE_ALLOC_BLOCK_SIZE;
955
950
  if (in_range_alloc_block_size < RANGE_ALLOC_BLOCK_SIZE)
956
951
  {
957
 
    cout << _("Error: Invalid Value for range_alloc_block_size");
 
952
    cout << N_("Error: Invalid Value for range_alloc_block_size");
958
953
    exit(-1);
959
954
  }
960
955
  in_range_alloc_block_size-= in_range_alloc_block_size % 1024;
966
961
  global_system_variables.read_buff_size= (128*1024L);
967
962
  if (in_read_buff_size < IO_SIZE*2 || in_read_buff_size > INT32_MAX)
968
963
  {
969
 
    cout << _("Error: Invalid Value for read_buff_size");
 
964
    cout << N_("Error: Invalid Value for read_buff_size");
970
965
    exit(-1);
971
966
  }
972
967
  in_read_buff_size-= in_read_buff_size % IO_SIZE;
978
973
  global_system_variables.read_rnd_buff_size= (256*1024L);
979
974
  if (in_read_rnd_buff_size < 64 || in_read_rnd_buff_size > UINT32_MAX)
980
975
  {
981
 
    cout << _("Error: Invalid Value for read_rnd_buff_size");
 
976
    cout << N_("Error: Invalid Value for read_rnd_buff_size");
982
977
    exit(-1);
983
978
  }
984
979
  global_system_variables.read_rnd_buff_size= in_read_rnd_buff_size;
989
984
  global_system_variables.sortbuff_size= MAX_SORT_MEMORY;
990
985
  if ((uint32_t)in_sortbuff_size < MIN_SORT_MEMORY)
991
986
  {
992
 
    cout << _("Error: Invalid Value for sort_buff_size");
 
987
    cout << N_("Error: Invalid Value for sort_buff_size");
993
988
    exit(-1);
994
989
  }
995
990
  global_system_variables.sortbuff_size= in_sortbuff_size;
1000
995
  table_def_size= 128;
1001
996
  if (in_table_def_size < 1 || in_table_def_size > 512*1024L)
1002
997
  {
1003
 
    cout << _("Error: Invalid Value for table_def_size");
 
998
    cout << N_("Error: Invalid Value for table_def_size");
1004
999
    exit(-1);
1005
1000
  }
1006
1001
  table_def_size= in_table_def_size;
1011
1006
  table_cache_size= TABLE_OPEN_CACHE_DEFAULT;
1012
1007
  if (in_table_cache_size < TABLE_OPEN_CACHE_MIN || in_table_cache_size > 512*1024L)
1013
1008
  {
1014
 
    cout << _("Error: Invalid Value for table_cache_size");
 
1009
    cout << N_("Error: Invalid Value for table_cache_size");
1015
1010
    exit(-1);
1016
1011
  }
1017
1012
  table_cache_size= in_table_cache_size;
1022
1017
  table_lock_wait_timeout= 50;
1023
1018
  if (in_table_lock_wait_timeout < 1 || in_table_lock_wait_timeout > 1024*1024*1024)
1024
1019
  {
1025
 
    cout << _("Error: Invalid Value for table_lock_wait_timeout");
 
1020
    cout << N_("Error: Invalid Value for table_lock_wait_timeout");
1026
1021
    exit(-1);
1027
1022
  }
1028
1023
  table_lock_wait_timeout= in_table_lock_wait_timeout;
1038
1033
  global_system_variables.tmp_table_size= 16*1024*1024L;
1039
1034
  if (in_tmp_table_size < 1024 || in_tmp_table_size > MAX_MEM_TABLE_SIZE)
1040
1035
  {
1041
 
    cout << _("Error: Invalid Value for table_lock_wait_timeout");
 
1036
    cout << N_("Error: Invalid Value for table_lock_wait_timeout");
1042
1037
    exit(-1);
1043
1038
  }
1044
1039
  global_system_variables.tmp_table_size= in_tmp_table_size;
1049
1044
  global_system_variables.transaction_message_threshold= 1024*1024;
1050
1045
  if ((int64_t) in_transaction_message_threshold < 128*1024 || (int64_t)in_transaction_message_threshold > 1024*1024)
1051
1046
  {
1052
 
    cout << _("Error: Invalid Value for transaction_message_threshold valid values are between 131072 - 1048576 bytes");
 
1047
    cout << N_("Error: Invalid Value for transaction_message_threshold valid values are between 131072 - 1048576 bytes");
1053
1048
    exit(-1);
1054
1049
  }
1055
1050
  global_system_variables.transaction_message_threshold= in_transaction_message_threshold;
1163
1158
 
1164
1159
  config_options.add_options()
1165
1160
  ("help,?", po::value<bool>(&opt_help)->default_value(false)->zero_tokens(),
1166
 
  _("Display this help and exit."))
 
1161
  N_("Display this help and exit."))
1167
1162
  ("no-defaults", po::value<bool>()->default_value(false)->zero_tokens(),
1168
 
  _("Configuration file defaults are not used if no-defaults is set"))
 
1163
  N_("Configuration file defaults are not used if no-defaults is set"))
1169
1164
  ("defaults-file", po::value<vector<string> >()->composing()->notifier(&compose_defaults_file_list),
1170
 
  _("Configuration file to use"))
 
1165
   N_("Configuration file to use"))
1171
1166
  ("config-dir", po::value<fs::path>(&system_config_dir),
1172
 
  _("Base location for config files"))
 
1167
   N_("Base location for config files"))
1173
1168
  ("plugin-dir", po::value<fs::path>(&plugin_dir)->notifier(&notify_plugin_dir),
1174
 
  _("Directory for plugins."))
 
1169
  N_("Directory for plugins."))
1175
1170
  ;
1176
1171
 
1177
1172
  plugin_load_options.add_options()
1178
1173
  ("plugin-add", po::value<vector<string> >()->composing()->notifier(&compose_plugin_add),
1179
 
  _("Optional comma separated list of plugins to load at startup in addition "
 
1174
  N_("Optional comma separated list of plugins to load at startup in addition "
1180
1175
     "to the default list of plugins. "
1181
1176
     "[for example: --plugin_add=crc32,logger_gearman]"))    
1182
1177
  ("plugin-remove", po::value<vector<string> >()->composing()->notifier(&compose_plugin_remove),
1183
 
  _("Optional comma separated list of plugins to not load at startup. Effectively "
 
1178
  N_("Optional comma separated list of plugins to not load at startup. Effectively "
1184
1179
     "removes a plugin from the list of plugins to be loaded. "
1185
1180
     "[for example: --plugin_remove=crc32,logger_gearman]"))
1186
1181
  ("plugin-load", po::value<string>()->notifier(&notify_plugin_load)->default_value(PANDORA_PLUGIN_LIST),
1187
 
  _("Optional comma separated list of plugins to load at starup instead of "
 
1182
  N_("Optional comma separated list of plugins to load at starup instead of "
1188
1183
     "the default plugin load list. "
1189
1184
     "[for example: --plugin_load=crc32,logger_gearman]"))
1190
1185
  ;
1191
1186
 
1192
1187
  long_options.add_options()
1193
1188
  ("auto-increment-increment", po::value<uint64_t>(&global_system_variables.auto_increment_increment)->default_value(1)->notifier(&check_limits_aii),
1194
 
  _("Auto-increment columns are incremented by this"))
 
1189
  N_("Auto-increment columns are incremented by this"))
1195
1190
  ("auto-increment-offset", po::value<uint64_t>(&global_system_variables.auto_increment_offset)->default_value(1)->notifier(&check_limits_aio),
1196
 
  _("Offset added to Auto-increment columns. Used when auto-increment-increment != 1"))
 
1191
  N_("Offset added to Auto-increment columns. Used when auto-increment-increment != 1"))
1197
1192
  ("basedir,b", po::value<fs::path>(&basedir),
1198
 
  _("Path to installation directory. All paths are usually resolved "
 
1193
  N_("Path to installation directory. All paths are usually resolved "
1199
1194
     "relative to this."))
1200
1195
  ("chroot,r", po::value<string>(),
1201
 
  _("Chroot drizzled daemon during startup."))
 
1196
  N_("Chroot drizzled daemon during startup."))
1202
1197
  ("collation-server", po::value<string>(),
1203
 
  _("Set the default collation."))      
 
1198
  N_("Set the default collation."))      
1204
1199
  ("completion-type", po::value<uint32_t>(&global_system_variables.completion_type)->default_value(0)->notifier(&check_limits_completion_type),
1205
 
  _("Default completion type."))
1206
 
  ("core-file",  _("Write core on errors."))
 
1200
  N_("Default completion type."))
 
1201
  ("core-file",  N_("Write core on errors."))
1207
1202
  ("datadir", po::value<fs::path>(&data_home),
1208
 
  _("Path to the database root."))
 
1203
  N_("Path to the database root."))
1209
1204
  ("default-storage-engine", po::value<string>(),
1210
 
  _("Set the default storage engine for tables."))
 
1205
  N_("Set the default storage engine for tables."))
1211
1206
  ("default-time-zone", po::value<string>(),
1212
 
  _("Set the default time zone."))
 
1207
  N_("Set the default time zone."))
1213
1208
  ("exit-info,T", po::value<long>(),
1214
 
  _("Used for debugging;  Use at your own risk!"))
 
1209
  N_("Used for debugging;  Use at your own risk!"))
1215
1210
  ("gdb", po::value<bool>(&opt_debugging)->default_value(false)->zero_tokens(),
1216
 
  _("Set up signals usable for debugging"))
 
1211
  N_("Set up signals usable for debugging"))
1217
1212
  ("lc-time-name", po::value<string>(),
1218
 
  _("Set the language used for the month names and the days of the week."))
 
1213
  N_("Set the language used for the month names and the days of the week."))
1219
1214
  ("log-warnings,W", po::value<bool>(&global_system_variables.log_warnings)->default_value(false)->zero_tokens(),
1220
 
  _("Log some not critical warnings to the log file."))  
 
1215
  N_("Log some not critical warnings to the log file."))  
1221
1216
  ("pid-file", po::value<fs::path>(&pid_file),
1222
 
  _("Pid file used by drizzled."))
 
1217
  N_("Pid file used by drizzled."))
1223
1218
  ("port-open-timeout", po::value<uint32_t>(&drizzled_bind_timeout)->default_value(0),
1224
 
  _("Maximum time in seconds to wait for the port to become free. "))
 
1219
  N_("Maximum time in seconds to wait for the port to become free. "))
1225
1220
  ("replicate-query", po::value<bool>(&global_system_variables.replicate_query)->default_value(false)->zero_tokens(),
1226
 
  _("Include the SQL query in replicated protobuf messages."))
 
1221
  N_("Include the SQL query in replicated protobuf messages."))
1227
1222
  ("secure-file-priv", po::value<fs::path>(&secure_file_priv)->notifier(expand_secure_file_priv),
1228
 
  _("Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to files "
 
1223
  N_("Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to files "
1229
1224
     "within specified directory"))
1230
1225
  ("server-id", po::value<uint32_t>(&server_id)->default_value(0),
1231
 
  _("Uniquely identifies the server instance in the community of "
 
1226
  N_("Uniquely identifies the server instance in the community of "
1232
1227
     "replication partners."))
1233
1228
  ("skip-stack-trace",  
1234
 
  _("Don't print a stack trace on failure."))
 
1229
  N_("Don't print a stack trace on failure."))
1235
1230
  ("symbolic-links,s", po::value<bool>(&internal::my_use_symdir)->default_value(IF_PURIFY(false,true))->zero_tokens(),
1236
 
  _("Enable symbolic link support."))
 
1231
  N_("Enable symbolic link support."))
1237
1232
  ("timed-mutexes", po::value<bool>(&internal::timed_mutexes)->default_value(false)->zero_tokens(),
1238
 
  _("Specify whether to time mutexes (only InnoDB mutexes are currently "
 
1233
  N_("Specify whether to time mutexes (only InnoDB mutexes are currently "
1239
1234
     "supported)")) 
1240
1235
  ("tmpdir,t", po::value<string>(),
1241
 
  _("Path for temporary files."))
 
1236
  N_("Path for temporary files."))
1242
1237
  ("transaction-isolation", po::value<string>(),
1243
 
  _("Default transaction isolation level."))
 
1238
  N_("Default transaction isolation level."))
1244
1239
  ("transaction-message-threshold", po::value<size_t>(&global_system_variables.transaction_message_threshold)->default_value(1024*1024)->notifier(&check_limits_transaction_message_threshold),
1245
 
  _("Max message size written to transaction log, valid values 131072 - 1048576 bytes."))
 
1240
  N_("Max message size written to transaction log, valid values 131072 - 1048576 bytes."))
1246
1241
  ("user,u", po::value<string>(),
1247
 
  _("Run drizzled daemon as user."))  
 
1242
  N_("Run drizzled daemon as user."))  
1248
1243
  ("version,V", 
1249
 
  _("Output version information and exit."))
 
1244
  N_("Output version information and exit."))
1250
1245
  ("back-log", po::value<back_log_constraints>(&back_log),
1251
 
  _("The number of outstanding connection requests Drizzle can have. This "
 
1246
  N_("The number of outstanding connection requests Drizzle can have. This "
1252
1247
     "comes into play when the main Drizzle thread gets very many connection "
1253
1248
     "requests in a very short time."))
1254
1249
  ("bulk-insert-buffer-size", 
1255
1250
  po::value<uint64_t>(&global_system_variables.bulk_insert_buff_size)->default_value(8192*1024),
1256
 
  _("Size of tree cache used in bulk insert optimization. Note that this is "
 
1251
  N_("Size of tree cache used in bulk insert optimization. Note that this is "
1257
1252
     "a limit per thread!"))
1258
1253
  ("div-precision-increment",  po::value<uint32_t>(&global_system_variables.div_precincrement)->default_value(4)->notifier(&check_limits_dpi),
1259
 
  _("Precision of the result of '/' operator will be increased on that "
 
1254
  N_("Precision of the result of '/' operator will be increased on that "
1260
1255
     "value."))
1261
1256
  ("group-concat-max-len", po::value<uint64_t>(&global_system_variables.group_concat_max_len)->default_value(1024)->notifier(&check_limits_gcml),
1262
 
  _("The maximum length of the result of function  group_concat."))
 
1257
  N_("The maximum length of the result of function  group_concat."))
1263
1258
  ("join-buffer-size", po::value<uint64_t>(&global_system_variables.join_buff_size)->default_value(128*1024L)->notifier(&check_limits_join_buffer_size),
1264
 
  _("The size of the buffer that is used for full joins."))
 
1259
  N_("The size of the buffer that is used for full joins."))
1265
1260
  ("join-heap-threshold",
1266
1261
  po::value<uint64_t>()->default_value(0),
1267
 
  _("A global cap on the amount of memory that can be allocated by session join buffers (0 means unlimited)"))
 
1262
  N_("A global cap on the amount of memory that can be allocated by session join buffers (0 means unlimited)"))
1268
1263
  ("max-allowed-packet", po::value<uint32_t>(&global_system_variables.max_allowed_packet)->default_value(64*1024*1024L)->notifier(&check_limits_map),
1269
 
  _("Max packetlength to send/receive from to server."))
 
1264
  N_("Max packetlength to send/receive from to server."))
1270
1265
  ("max-connect-errors", po::value<uint64_t>(&max_connect_errors)->default_value(MAX_CONNECT_ERRORS)->notifier(&check_limits_mce),
1271
 
  _("If there is more than this number of interrupted connections from a "
 
1266
  N_("If there is more than this number of interrupted connections from a "
1272
1267
     "host this host will be blocked from further connections."))
1273
1268
  ("max-error-count", po::value<uint64_t>(&global_system_variables.max_error_count)->default_value(DEFAULT_ERROR_COUNT)->notifier(&check_limits_max_err_cnt),
1274
 
  _("Max number of errors/warnings to store for a statement."))
 
1269
  N_("Max number of errors/warnings to store for a statement."))
1275
1270
  ("max-heap-table-size", po::value<uint64_t>(&global_system_variables.max_heap_table_size)->default_value(16*1024*1024L)->notifier(&check_limits_mhts),
1276
 
  _("Don't allow creation of heap tables bigger than this."))
 
1271
  N_("Don't allow creation of heap tables bigger than this."))
1277
1272
  ("max-join-size", po::value<drizzled::ha_rows>(&global_system_variables.max_join_size)->default_value(INT32_MAX)->notifier(&check_limits_max_join_size),
1278
 
  _("Joins that are probably going to read more than max_join_size records "
 
1273
  N_("Joins that are probably going to read more than max_join_size records "
1279
1274
     "return an error."))
1280
1275
  ("max-length-for-sort-data", po::value<uint64_t>(&global_system_variables.max_length_for_sort_data)->default_value(1024)->notifier(&check_limits_mlfsd),
1281
 
  _("Max number of bytes in sorted records."))
 
1276
  N_("Max number of bytes in sorted records."))
1282
1277
  ("max-seeks-for-key", po::value<uint64_t>(&global_system_variables.max_seeks_for_key)->default_value(ULONG_MAX)->notifier(&check_limits_msfk),
1283
 
  _("Limit assumed max number of seeks when looking up rows based on a key"))
 
1278
  N_("Limit assumed max number of seeks when looking up rows based on a key"))
1284
1279
  ("max-sort-length", po::value<size_t>(&global_system_variables.max_sort_length)->default_value(1024)->notifier(&check_limits_max_sort_length),  
1285
 
  _("The number of bytes to use when sorting BLOB or TEXT values "
 
1280
  N_("The number of bytes to use when sorting BLOB or TEXT values "
1286
1281
     "(only the first max_sort_length bytes of each value are used; the "
1287
1282
     "rest are ignored)."))
1288
1283
  ("max-write-lock-count", po::value<uint64_t>(&max_write_lock_count)->default_value(UINT64_MAX),
1289
 
  _("After this many write locks, allow some read locks to run in between."))
 
1284
  N_("After this many write locks, allow some read locks to run in between."))
1290
1285
  ("min-examined-row-limit", po::value<uint64_t>(&global_system_variables.min_examined_row_limit)->default_value(0)->notifier(&check_limits_merl),
1291
 
  _("Don't log queries which examine less than min_examined_row_limit "
 
1286
  N_("Don't log queries which examine less than min_examined_row_limit "
1292
1287
     "rows to file."))
1293
1288
  ("disable-optimizer-prune",
1294
 
  _("Do not apply any heuristic(s) during query optimization to prune, "
 
1289
  N_("Do not apply any heuristic(s) during query optimization to prune, "
1295
1290
     "thus perform an exhaustive search from the optimizer search space."))
1296
1291
  ("optimizer-search-depth", po::value<uint32_t>(&global_system_variables.optimizer_search_depth)->default_value(0)->notifier(&check_limits_osd),
1297
 
  _("Maximum depth of search performed by the query optimizer. Values "
 
1292
  N_("Maximum depth of search performed by the query optimizer. Values "
1298
1293
     "larger than the number of relations in a query result in better query "
1299
1294
     "plans, but take longer to compile a query. Smaller values than the "
1300
1295
     "number of tables in a relation result in faster optimization, but may "
1303
1298
     "optimizer will switch to the original find_best (used for "
1304
1299
     "testing/comparison)."))
1305
1300
  ("preload-buffer-size", po::value<uint64_t>(&global_system_variables.preload_buff_size)->default_value(32*1024L)->notifier(&check_limits_pbs),
1306
 
  _("The size of the buffer that is allocated when preloading indexes"))
 
1301
  N_("The size of the buffer that is allocated when preloading indexes"))
1307
1302
  ("query-alloc-block-size", 
1308
1303
  po::value<uint32_t>(&global_system_variables.query_alloc_block_size)->default_value(QUERY_ALLOC_BLOCK_SIZE)->notifier(&check_limits_qabs),
1309
 
  _("Allocation block size for query parsing and execution"))
 
1304
  N_("Allocation block size for query parsing and execution"))
1310
1305
  ("query-prealloc-size",
1311
1306
  po::value<uint32_t>(&global_system_variables.query_prealloc_size)->default_value(QUERY_ALLOC_PREALLOC_SIZE)->notifier(&check_limits_qps),
1312
 
  _("Persistent buffer for query parsing and execution"))
 
1307
  N_("Persistent buffer for query parsing and execution"))
1313
1308
  ("range-alloc-block-size",
1314
1309
  po::value<size_t>(&global_system_variables.range_alloc_block_size)->default_value(RANGE_ALLOC_BLOCK_SIZE)->notifier(&check_limits_rabs),
1315
 
  _("Allocation block size for storing ranges during optimization"))
 
1310
  N_("Allocation block size for storing ranges during optimization"))
1316
1311
  ("read-buffer-size",
1317
1312
  po::value<uint32_t>(&global_system_variables.read_buff_size)->default_value(128*1024L)->notifier(&check_limits_read_buffer_size),
1318
 
  _("Each thread that does a sequential scan allocates a buffer of this "
 
1313
  N_("Each thread that does a sequential scan allocates a buffer of this "
1319
1314
      "size for each table it scans. If you do many sequential scans, you may "
1320
1315
      "want to increase this value."))
1321
1316
  ("read-buffer-threshold",
1322
1317
  po::value<uint64_t>()->default_value(0),
1323
 
  _("A global cap on the size of read-buffer-size (0 means unlimited)"))
 
1318
  N_("A global cap on the size of read-buffer-size (0 means unlimited)"))
1324
1319
  ("read-rnd-buffer-size",
1325
1320
  po::value<uint32_t>(&global_system_variables.read_rnd_buff_size)->default_value(256*1024L)->notifier(&check_limits_read_rnd_buffer_size),
1326
 
  _("When reading rows in sorted order after a sort, the rows are read "
 
1321
  N_("When reading rows in sorted order after a sort, the rows are read "
1327
1322
     "through this buffer to avoid a disk seeks. If not set, then it's set "
1328
1323
     "to the value of record_buffer."))
1329
1324
  ("read-rnd-threshold",
1330
1325
  po::value<uint64_t>()->default_value(0),
1331
 
  _("A global cap on the size of read-rnd-buffer-size (0 means unlimited)"))
 
1326
  N_("A global cap on the size of read-rnd-buffer-size (0 means unlimited)"))
1332
1327
  ("scheduler", po::value<string>(),
1333
 
  _("Select scheduler to be used (by default multi-thread)."))
 
1328
  N_("Select scheduler to be used (by default multi-thread)."))
1334
1329
  ("sort-buffer-size",
1335
1330
  po::value<size_t>(&global_system_variables.sortbuff_size)->default_value(MAX_SORT_MEMORY)->notifier(&check_limits_sort_buffer_size),
1336
 
  _("Each thread that needs to do a sort allocates a buffer of this size."))
 
1331
  N_("Each thread that needs to do a sort allocates a buffer of this size."))
1337
1332
  ("sort-heap-threshold",
1338
1333
  po::value<uint64_t>()->default_value(0),
1339
 
  _("A global cap on the amount of memory that can be allocated by session sort buffers (0 means unlimited)"))
 
1334
  N_("A global cap on the amount of memory that can be allocated by session sort buffers (0 means unlimited)"))
1340
1335
  ("table-definition-cache", po::value<size_t>(&table_def_size)->default_value(128)->notifier(&check_limits_tdc),
1341
 
  _("The number of cached table definitions."))
 
1336
  N_("The number of cached table definitions."))
1342
1337
  ("table-open-cache", po::value<uint64_t>(&table_cache_size)->default_value(TABLE_OPEN_CACHE_DEFAULT)->notifier(&check_limits_toc),
1343
 
  _("The number of cached open tables."))
 
1338
  N_("The number of cached open tables."))
1344
1339
  ("table-lock-wait-timeout", po::value<uint64_t>(&table_lock_wait_timeout)->default_value(50)->notifier(&check_limits_tlwt),
1345
 
  _("Timeout in seconds to wait for a table level lock before returning an "
 
1340
  N_("Timeout in seconds to wait for a table level lock before returning an "
1346
1341
     "error. Used only if the connection has active cursors."))
1347
1342
  ("thread-stack", po::value<size_t>(&my_thread_stack_size)->default_value(DEFAULT_THREAD_STACK)->notifier(&check_limits_thread_stack),
1348
 
  _("The stack size for each thread."))
 
1343
  N_("The stack size for each thread."))
1349
1344
  ("tmp-table-size", 
1350
1345
  po::value<uint64_t>(&global_system_variables.tmp_table_size)->default_value(16*1024*1024L)->notifier(&check_limits_tmp_table_size),
1351
 
  _("If an internal in-memory temporary table exceeds this size, Drizzle will"
 
1346
  N_("If an internal in-memory temporary table exceeds this size, Drizzle will"
1352
1347
     " automatically convert it to an on-disk MyISAM table."))
1353
1348
  ;
1354
1349
 
1793
1788
  {"datadir", 'h',
1794
1789
   N_("Path to the database root."),
1795
1790
   NULL, NULL, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
 
1791
  {"default-storage-engine", OPT_STORAGE_ENGINE,
 
1792
   N_("Set the default storage engine (table type) for tables."),
 
1793
   (char**)&default_storage_engine_str, (char**)&default_storage_engine_str,
 
1794
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
 
1795
  {"default-time-zone", OPT_DEFAULT_TIME_ZONE,
 
1796
   N_("Set the default time zone."),
 
1797
   (char**) &default_tz_name, (char**) &default_tz_name,
 
1798
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
1796
1799
  /* See how it's handled in get_one_option() */
1797
1800
  {"exit-info", 'T',
1798
1801
   N_("Used for debugging;  Use at your own risk!"),
1803
1806
   N_("Set up signals usable for debugging"),
1804
1807
   (char**) &opt_debugging, (char**) &opt_debugging,
1805
1808
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
 
1809
  {"lc-time-names", OPT_LC_TIME_NAMES,
 
1810
   N_("Set the language used for the month names and the days of the week."),
 
1811
   (char**) &lc_time_names_name,
 
1812
   (char**) &lc_time_names_name,
 
1813
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
1806
1814
  {"log-warnings", 'W',
1807
1815
   N_("Log some not critical warnings to the log file."),
1808
1816
   (char**) &global_system_variables.log_warnings,
1845
1853
      "supported)"),
1846
1854
   (char**) &internal::timed_mutexes, (char**) &internal::timed_mutexes, 0, GET_BOOL, NO_ARG, 0,
1847
1855
    0, 0, 0, 0, 0},
 
1856
  {"tmpdir", 't',
 
1857
   N_("Path for temporary files."),
 
1858
   (char**) &opt_drizzle_tmpdir,
 
1859
   (char**) &opt_drizzle_tmpdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1848
1860
  {"transaction-isolation", OPT_TX_ISOLATION,
1849
1861
   N_("Default transaction isolation level."),
1850
1862
   0, 0, 0, GET_STR, REQUIRED_ARG, 0,
1853
1865
   N_("Run drizzled daemon as user."),
1854
1866
   0, 0, 0, GET_STR, REQUIRED_ARG,
1855
1867
   0, 0, 0, 0, 0, 0},
 
1868
  {"version", 'V',
 
1869
   N_("Output version information and exit."),
 
1870
   0, 0, 0, GET_NO_ARG,
 
1871
   NO_ARG, 0, 0, 0, 0, 0, 0},
1856
1872
  {"back_log", OPT_BACK_LOG,
1857
1873
   N_("The number of outstanding connection requests Drizzle can have. This "
1858
1874
      "comes into play when the main Drizzle thread gets very many connection "
1871
1887
   (char**) &global_system_variables.div_precincrement,
1872
1888
   (char**) &max_system_variables.div_precincrement, 0, GET_UINT,
1873
1889
   REQUIRED_ARG, 4, 0, DECIMAL_MAX_SCALE, 0, 0, 0},
 
1890
  { "group_concat_max_len", OPT_GROUP_CONCAT_MAX_LEN,
 
1891
    N_("The maximum length of the result of function  group_concat."),
 
1892
    (char**) &global_system_variables.group_concat_max_len,
 
1893
    (char**) &max_system_variables.group_concat_max_len, 0, GET_UINT64,
 
1894
    REQUIRED_ARG, 1024, 4, ULONG_MAX, 0, 1, 0},
1874
1895
  { "join_buffer_size", OPT_JOIN_BUFF_SIZE,
1875
1896
    N_("The size of the buffer that is used for full joins."),
1876
1897
   (char**) &global_system_variables.join_buff_size,
1887
1908
      "host this host will be blocked from further connections."),
1888
1909
   (char**) &max_connect_errors, (char**) &max_connect_errors, 0, GET_UINT64,
1889
1910
   REQUIRED_ARG, MAX_CONNECT_ERRORS, 1, ULONG_MAX, 0, 1, 0},
 
1911
  {"max_error_count", OPT_MAX_ERROR_COUNT,
 
1912
   N_("Max number of errors/warnings to store for a statement."),
 
1913
   (char**) &global_system_variables.max_error_count,
 
1914
   (char**) &max_system_variables.max_error_count,
 
1915
   0, GET_UINT64, REQUIRED_ARG, DEFAULT_ERROR_COUNT, 0, 65535, 0, 1, 0},
1890
1916
  {"max_heap_table_size", OPT_MAX_HEP_TABLE_SIZE,
1891
1917
   N_("Don't allow creation of heap tables bigger than this."),
1892
1918
   (char**) &global_system_variables.max_heap_table_size,
2006
2032
   (char**) &max_system_variables.read_rnd_buff_size, 0,
2007
2033
   GET_UINT, REQUIRED_ARG, 256*1024L, 64 /*IO_SIZE*2+MALLOC_OVERHEAD*/ ,
2008
2034
   UINT32_MAX, MALLOC_OVERHEAD, 1 /* Small lower limit to be able to test MRR */, 0},
 
2035
  {"scheduler", OPT_SCHEDULER,
 
2036
   N_("Select scheduler to be used (by default multi-thread)."),
 
2037
   (char**)&opt_scheduler, (char**)&opt_scheduler,
 
2038
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
2009
2039
  /* x8 compared to MySQL's x2. We have UTF8 to consider. */
2010
2040
  {"sort_buffer_size", OPT_SORT_BUFFER,
2011
2041
   N_("Each thread that needs to do a sort allocates a buffer of this size."),
2204
2234
      (vm["sort-heap-threshold"].as<uint64_t>() < 
2205
2235
      global_system_variables.sortbuff_size))
2206
2236
    {
2207
 
      cout << _("Error: sort-heap-threshold cannot be less than sort-buffer-size") << endl;
 
2237
      cout << N_("Error: sort-heap-threshold cannot be less than sort-buffer-size") << endl;
2208
2238
      exit(-1);
2209
2239
    }
2210
2240
 
2217
2247
      (vm["join-heap-threshold"].as<uint64_t>() <
2218
2248
      global_system_variables.join_buff_size))
2219
2249
    {
2220
 
      cout << _("Error: join-heap-threshold cannot be less than join-buffer-size") << endl;
 
2250
      cout << N_("Error: join-heap-threshold cannot be less than join-buffer-size") << endl;
2221
2251
      exit(-1);
2222
2252
    }
2223
2253
 
2230
2260
      (vm["read-rnd-threshold"].as<uint64_t>() <
2231
2261
      global_system_variables.read_rnd_buff_size))
2232
2262
    {
2233
 
      cout << _("Error: read-rnd-threshold cannot be less than read-rnd-buffer-size") << endl;
 
2263
      cout << N_("Error: read-rnd-threshold cannot be less than read-rnd-buffer-size") << endl;
2234
2264
      exit(-1);
2235
2265
    }
2236
2266
 
2243
2273
      (vm["read-buffer-threshold"].as<uint64_t>() <
2244
2274
      global_system_variables.read_buff_size))
2245
2275
    {
2246
 
      cout << _("Error: read-buffer-threshold cannot be less than read-buffer-size") << endl;
 
2276
      cout << N_("Error: read-buffer-threshold cannot be less than read-buffer-size") << endl;
2247
2277
      exit(-1);
2248
2278
    }
2249
2279