~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Brian Aker
  • Date: 2008-08-14 22:07:26 UTC
  • mfrom: (312.1.18 codestyle)
  • Revision ID: brian@tangent.org-20080814220726-rg3cjhim3uj4weq1
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
1427
1427
  */
1428
1428
  if (segfaulted)
1429
1429
  {
1430
 
    fprintf(stderr, "Fatal " SIGNAL_FMT " while backtracing\n", sig);
 
1430
    fprintf(stderr, _("Fatal " SIGNAL_FMT " while backtracing\n"), sig);
1431
1431
    exit(1);
1432
1432
  }
1433
1433
 
1436
1436
  curr_time= my_time(0);
1437
1437
  localtime_r(&curr_time, &tm);
1438
1438
 
1439
 
  fprintf(stderr,"\
1440
 
%02d%02d%02d %2d:%02d:%02d - mysqld got " SIGNAL_FMT " ;\n\
1441
 
This could be because you hit a bug. It is also possible that this binary\n\
1442
 
or one of the libraries it was linked against is corrupt, improperly built,\n\
1443
 
or misconfigured. This error can also be caused by malfunctioning hardware.\n",
 
1439
  fprintf(stderr,"%02d%02d%02d %2d:%02d:%02d - mysqld got "
 
1440
          SIGNAL_FMT " ;\n"
 
1441
          "This could be because you hit a bug. It is also possible that "
 
1442
          "this binary\n or one of the libraries it was linked against is "
 
1443
          "corrupt, improperly built,\n or misconfigured. This error can "
 
1444
          "also be caused by malfunctioning hardware.\n",
1444
1445
          tm.tm_year % 100, tm.tm_mon+1, tm.tm_mday,
1445
1446
          tm.tm_hour, tm.tm_min, tm.tm_sec,
1446
 
          sig);
1447
 
  fprintf(stderr, "\
1448
 
We will try our best to scrape up some info that will hopefully help diagnose\n\
1449
 
the problem, but since we have already crashed, something is definitely wrong\n\
1450
 
and this may fail.\n\n");
 
1447
          sig);
 
1448
  fprintf(stderr, _("We will try our best to scrape up some info that "
 
1449
                    "will hopefully help diagnose\n"
 
1450
                    "the problem, but since we have already crashed, "
 
1451
                    "something is definitely wrong\nand this may fail.\n\n"));
1451
1452
  fprintf(stderr, "key_buffer_size=%lu\n",
1452
1453
          (ulong) dflt_key_cache->key_cache_mem_size);
1453
1454
  fprintf(stderr, "read_buffer_size=%ld\n", (long) global_system_variables.read_buff_size);
1455
1456
  fprintf(stderr, "max_threads=%u\n", thread_scheduler.max_threads);
1456
1457
  fprintf(stderr, "thread_count=%u\n", thread_count);
1457
1458
  fprintf(stderr, "connection_count=%u\n", connection_count);
1458
 
  fprintf(stderr, "It is possible that mysqld could use up to \n\
1459
 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = %lu K\n\
1460
 
bytes of memory\n", ((ulong) dflt_key_cache->key_cache_mem_size +
1461
 
                     (global_system_variables.read_buff_size +
1462
 
                      global_system_variables.sortbuff_size) *
1463
 
                     thread_scheduler.max_threads +
 
1459
  fprintf(stderr, _("It is possible that mysqld could use up to \n"
 
1460
                    "key_buffer_size + (read_buffer_size + "
 
1461
                    "sort_buffer_size)*max_threads = %lu K\n"
 
1462
                    "bytes of memory\n"
 
1463
                    "Hope that's ok; if not, decrease some variables in the "
 
1464
                    "equation.\n\n"),
 
1465
                    ((ulong) dflt_key_cache->key_cache_mem_size +
 
1466
                     (global_system_variables.read_buff_size +
 
1467
                      global_system_variables.sortbuff_size) *
 
1468
                     thread_scheduler.max_threads +
1464
1469
                     max_connections * sizeof(THD)) / 1024);
1465
 
  fprintf(stderr, "Hope that's ok; if not, decrease some variables in the equation.\n\n");
1466
1470
 
1467
1471
#ifdef HAVE_STACKTRACE
1468
1472
  THD *thd= current_thd;
1470
1474
  if (!(test_flags & TEST_NO_STACKTRACE))
1471
1475
  {
1472
1476
    fprintf(stderr,"thd: 0x%lx\n",(long) thd);
1473
 
    fprintf(stderr,"\
1474
 
Attempting backtrace. You can use the following information to find out\n\
1475
 
where mysqld died. If you see no messages after this, something went\n\
1476
 
terribly wrong...\n");
 
1477
    fprintf(stderr,_("Attempting backtrace. You can use the following "
 
1478
                     "information to find out\n"
 
1479
                     "where mysqld died. If you see no messages after this, "
 
1480
                     "something went\n"
 
1481
                     "terribly wrong...\n"));
1477
1482
    print_stacktrace(thd ? (uchar*) thd->thread_stack : (uchar*) 0,
1478
1483
                     my_thread_stack_size);
1479
1484
  }
1497
1502
      kreason= "KILLED_NO_VALUE";
1498
1503
      break;
1499
1504
    }
1500
 
    fprintf(stderr, "Trying to get some variables.\n\
1501
 
Some pointers may be invalid and cause the dump to abort...\n");
 
1505
    fprintf(stderr, _("Trying to get some variables.\n"
 
1506
                      "Some pointers may be invalid and cause the "
 
1507
                      "dump to abort...\n"));
1502
1508
    safe_print_str("thd->query", thd->query, 1024);
1503
1509
    fprintf(stderr, "thd->thread_id=%lu\n", (ulong) thd->thread_id);
1504
1510
    fprintf(stderr, "thd->killed=%s\n", kreason);
1505
1511
  }
1506
 
  fprintf(stderr, "\
1507
 
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains\n\
1508
 
information that should help you find out what is causing the crash.\n");
1509
1512
  fflush(stderr);
1510
1513
#endif /* HAVE_STACKTRACE */
1511
1514
 
1512
1515
#ifdef HAVE_INITGROUPS
1513
1516
  if (calling_initgroups)
1514
 
    fprintf(stderr, "\n\
1515
 
This crash occured while the server was calling initgroups(). This is\n\
1516
 
often due to the use of a mysqld that is statically linked against glibc\n\
1517
 
and configured to use LDAP in /etc/nsswitch.conf. You will need to either\n\
1518
 
upgrade to a version of glibc that does not have this problem (2.3.4 or\n\
1519
 
later when used with nscd), disable LDAP in your nsswitch.conf, or use a\n\
1520
 
mysqld that is not statically linked.\n");
 
1517
    fprintf(stderr, _("\nThis crash occured while the server was calling "
 
1518
                      "initgroups(). This is\n"
 
1519
                      "often due to the use of a drizzled that is statically "
 
1520
                      "linked against glibc\n"
 
1521
                      "and configured to use LDAP in /etc/nsswitch.conf. "
 
1522
                      "You will need to either\n"
 
1523
                      "upgrade to a version of glibc that does not have this "
 
1524
                      "problem (2.3.4 or\n"
 
1525
                      "later when used with nscd), disable LDAP in your "
 
1526
                      "nsswitch.conf, or use a\n"
 
1527
                      "drizzled that is not statically linked.\n"));
1521
1528
#endif
1522
1529
 
1523
1530
  if (thd_lib_detected == THD_LIB_LT && !getenv("LD_ASSUME_KERNEL"))
1524
 
    fprintf(stderr,"\n\
1525
 
You are running a statically-linked LinuxThreads binary on an NPTL system.\n\
1526
 
This can result in crashes on some distributions due to LT/NPTL conflicts.\n\
1527
 
You should either build a dynamically-linked binary, or force LinuxThreads\n\
1528
 
to be used with the LD_ASSUME_KERNEL environment variable. Please consult\n\
1529
 
the documentation for your distribution on how to do that.\n");
 
1531
    fprintf(stderr,
 
1532
            _("\nYou are running a statically-linked LinuxThreads binary "
 
1533
              "on an NPTL system.\n"
 
1534
              "This can result in crashes on some distributions due "
 
1535
              "to LT/NPTL conflicts.\n"
 
1536
              "You should either build a dynamically-linked binary, or force "
 
1537
              "LinuxThreads\n"
 
1538
              "to be used with the LD_ASSUME_KERNEL environment variable. "
 
1539
              "Please consult\n"
 
1540
              "the documentation for your distribution on how to do that.\n"));
1530
1541
 
1531
1542
  if (locked_in_memory)
1532
1543
  {
1533
 
    fprintf(stderr, "\n\
1534
 
The \"--memlock\" argument, which was enabled, uses system calls that are\n\
1535
 
unreliable and unstable on some operating systems and operating-system\n\
1536
 
versions (notably, some versions of Linux).  This crash could be due to use\n\
1537
 
of those buggy OS calls.  You should consider whether you really need the\n\
1538
 
\"--memlock\" parameter and/or consult the OS distributer about \"mlockall\"\n\
1539
 
bugs.\n");
 
1544
    fprintf(stderr,
 
1545
            _("\nThe '--memlock' argument, which was enabled, uses system "
 
1546
              "calls that are\n"
 
1547
              "unreliable and unstable on some operating systems and "
 
1548
              "operating-system\n"
 
1549
              "versions (notably, some versions of Linux).  "
 
1550
              "This crash could be due to use\n"
 
1551
              "of those buggy OS calls.  You should consider whether you "
 
1552
              "really need the\n"
 
1553
              "'--memlock' parameter and/or consult the OS "
 
1554
              "distributor about 'mlockall'\n bugs.\n"));
1540
1555
  }
1541
1556
 
1542
1557
#ifdef HAVE_WRITE_CORE
1543
1558
  if (test_flags & TEST_CORE_ON_SIGNAL)
1544
1559
  {
1545
 
    fprintf(stderr, "Writing a core file\n");
 
1560
    fprintf(stderr, _("Writing a core file\n"));
1546
1561
    fflush(stderr);
1547
1562
    write_core(sig);
1548
1563
  }
1932
1947
  }
1933
1948
  if (!(*var_ptr= date_time_format_make(format_type, str, strlen(str))))
1934
1949
  {
1935
 
    fprintf(stderr, "Wrong date/time format specifier: %s\n", str);
 
1950
    fprintf(stderr, _("Wrong date/time format specifier: %s\n"), str);
1936
1951
    return 1;
1937
1952
  }
1938
1953
  return 0;
2469
2484
 
2470
2485
    if (defaults_argc)
2471
2486
    {
2472
 
      fprintf(stderr, "%s: Too many arguments (first extra is '%s').\n"
2473
 
              "Use --verbose --help to get a list of available options\n",
 
2487
      fprintf(stderr,
 
2488
              _("%s: Too many arguments (first extra is '%s').\n"
 
2489
                "Use --verbose --help to get a list of available options\n"),
2474
2490
              my_progname, *tmp_argv);
2475
2491
      unireg_abort(1);
2476
2492
    }
3822
3838
   (char**) &max_system_variables.max_tmp_tables, 0, GET_ULONG,
3823
3839
   REQUIRED_ARG, 32, 1, ULONG_MAX, 0, 1, 0},
3824
3840
  {"max_write_lock_count", OPT_MAX_WRITE_LOCK_COUNT,
3825
 
   "After this many write locks, allow some read locks to run in between.",
 
3841
   N_("After this many write locks, allow some read locks to run in between."),
3826
3842
   (char**) &max_write_lock_count, (char**) &max_write_lock_count, 0, GET_ULONG,
3827
3843
   REQUIRED_ARG, ULONG_MAX, 1, ULONG_MAX, 0, 1, 0},
3828
3844
  {"min_examined_row_limit", OPT_MIN_EXAMINED_ROW_LIMIT,
3829
 
   "Don't log queries which examine less than min_examined_row_limit rows to file.",
 
3845
   N_("Don't log queries which examine less than min_examined_row_limit "
 
3846
      "rows to file."),
3830
3847
   (char**) &global_system_variables.min_examined_row_limit,
3831
3848
   (char**) &max_system_variables.min_examined_row_limit, 0, GET_ULONG,
3832
3849
   REQUIRED_ARG, 0, 0, ULONG_MAX, 0, 1L, 0},
3833
3850
  {"myisam_block_size", OPT_MYISAM_BLOCK_SIZE,
3834
 
   "Block size to be used for MyISAM index pages.",
 
3851
   N_("Block size to be used for MyISAM index pages."),
3835
3852
   (char**) &opt_myisam_block_size,
3836
3853
   (char**) &opt_myisam_block_size, 0, GET_ULONG, REQUIRED_ARG,
3837
3854
   MI_KEY_BLOCK_LENGTH, MI_MIN_KEY_BLOCK_LENGTH, MI_MAX_KEY_BLOCK_LENGTH,
3838
3855
   0, MI_MIN_KEY_BLOCK_LENGTH, 0},
3839
3856
  {"myisam_data_pointer_size", OPT_MYISAM_DATA_POINTER_SIZE,
3840
 
   "Default pointer size to be used for MyISAM tables.",
 
3857
   N_("Default pointer size to be used for MyISAM tables."),
3841
3858
   (char**) &myisam_data_pointer_size,
3842
3859
   (char**) &myisam_data_pointer_size, 0, GET_ULONG, REQUIRED_ARG,
3843
3860
   6, 2, 7, 0, 1, 0},
3844
3861
  {"myisam_max_extra_sort_file_size", OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE,
3845
 
   "Deprecated option",
 
3862
   N_("(Deprecated option)"),
3846
3863
   (char**) &global_system_variables.myisam_max_extra_sort_file_size,
3847
3864
   (char**) &max_system_variables.myisam_max_extra_sort_file_size,
3848
3865
   0, GET_ULL, REQUIRED_ARG, (uint64_t) MI_MAX_TEMP_LENGTH,
3849
3866
   0, (uint64_t) MAX_FILE_SIZE, 0, 1, 0},
3850
3867
  {"myisam_max_sort_file_size", OPT_MYISAM_MAX_SORT_FILE_SIZE,
3851
 
   "Don't use the fast sort index method to created index if the temporary file would get bigger than this.",
 
3868
   N_("Don't use the fast sort index method to created index if the "
 
3869
      "temporary file would get bigger than this."),
3852
3870
   (char**) &global_system_variables.myisam_max_sort_file_size,
3853
3871
   (char**) &max_system_variables.myisam_max_sort_file_size, 0,
3854
3872
   GET_ULL, REQUIRED_ARG, (int64_t) LONG_MAX, 0, (uint64_t) MAX_FILE_SIZE,
3855
3873
   0, 1024*1024, 0},
3856
3874
  {"myisam_repair_threads", OPT_MYISAM_REPAIR_THREADS,
3857
 
   "Number of threads to use when repairing MyISAM tables. The value of 1 disables parallel repair.",
 
3875
   N_("Number of threads to use when repairing MyISAM tables. The value of "
 
3876
      "1 disables parallel repair."),
3858
3877
   (char**) &global_system_variables.myisam_repair_threads,
3859
3878
   (char**) &max_system_variables.myisam_repair_threads, 0,
3860
3879
   GET_ULONG, REQUIRED_ARG, 1, 1, ULONG_MAX, 0, 1, 0},
3861
3880
  {"myisam_sort_buffer_size", OPT_MYISAM_SORT_BUFFER_SIZE,
3862
 
   "The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.",
 
3881
   N_("The buffer that is allocated when sorting the index when doing a "
 
3882
      "REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE."),
3863
3883
   (char**) &global_system_variables.myisam_sort_buff_size,
3864
3884
   (char**) &max_system_variables.myisam_sort_buff_size, 0,
3865
3885
   GET_ULONG, REQUIRED_ARG, 8192*1024, 4, ~0L, 0, 1, 0},
3866
3886
  {"myisam_stats_method", OPT_MYISAM_STATS_METHOD,
3867
 
   "Specifies how MyISAM index statistics collection code should threat NULLs. "
3868
 
   "Possible values of name are \"nulls_unequal\" (default behavior for 4.1/5.0), "
3869
 
   "\"nulls_equal\" (emulate 4.0 behavior), and \"nulls_ignored\".",
 
3887
   N_("Specifies how MyISAM index statistics collection code should threat "
 
3888
      "NULLs. Possible values of name are 'nulls_unequal' "
 
3889
      "(default behavior), "
 
3890
      "'nulls_equal' (emulate MySQL 4.0 behavior), and 'nulls_ignored'."),
3870
3891
   (char**) &myisam_stats_method_str, (char**) &myisam_stats_method_str, 0,
3871
3892
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3872
3893
  {"net_buffer_length", OPT_NET_BUFFER_LENGTH,
3873
 
   "Buffer length for TCP/IP and socket communication.",
 
3894
   N_("Buffer length for TCP/IP and socket communication."),
3874
3895
   (char**) &global_system_variables.net_buffer_length,
3875
3896
   (char**) &max_system_variables.net_buffer_length, 0, GET_ULONG,
3876
3897
   REQUIRED_ARG, 16384, 1024, 1024*1024L, 0, 1024, 0},
3877
3898
  {"net_read_timeout", OPT_NET_READ_TIMEOUT,
3878
 
   "Number of seconds to wait for more data from a connection before aborting the read.",
 
3899
   N_("Number of seconds to wait for more data from a connection before "
 
3900
      "aborting the read."),
3879
3901
   (char**) &global_system_variables.net_read_timeout,
3880
3902
   (char**) &max_system_variables.net_read_timeout, 0, GET_ULONG,
3881
3903
   REQUIRED_ARG, NET_READ_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
3882
3904
  {"net_retry_count", OPT_NET_RETRY_COUNT,
3883
 
   "If a read on a communication port is interrupted, retry this many times before giving up.",
 
3905
   N_("If a read on a communication port is interrupted, retry this many "
 
3906
      "times before giving up."),
3884
3907
   (char**) &global_system_variables.net_retry_count,
3885
3908
   (char**) &max_system_variables.net_retry_count,0,
3886
3909
   GET_ULONG, REQUIRED_ARG, MYSQLD_NET_RETRY_COUNT, 1, ULONG_MAX, 0, 1, 0},
3887
3910
  {"net_write_timeout", OPT_NET_WRITE_TIMEOUT,
3888
 
   "Number of seconds to wait for a block to be written to a connection  before aborting the write.",
 
3911
   N_("Number of seconds to wait for a block to be written to a connection "
 
3912
      "before aborting the write."),
3889
3913
   (char**) &global_system_variables.net_write_timeout,
3890
3914
   (char**) &max_system_variables.net_write_timeout, 0, GET_ULONG,
3891
3915
   REQUIRED_ARG, NET_WRITE_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
3892
 
  { "old", OPT_OLD_MODE, "Use compatible behavior.",
 
3916
  { "old", OPT_OLD_MODE,
 
3917
    N_("Use compatible behavior."),
3893
3918
    (char**) &global_system_variables.old_mode,
3894
3919
    (char**) &max_system_variables.old_mode, 0, GET_BOOL, NO_ARG,
3895
3920
    0, 0, 0, 0, 0, 0},
3896
3921
  {"open_files_limit", OPT_OPEN_FILES_LIMIT,
3897
 
   "If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of files.",
 
3922
   N_("If this is not 0, then mysqld will use this value to reserve file "
 
3923
      "descriptors to use with setrlimit(). If this value is 0 then mysqld "
 
3924
      "will reserve max_connections*5 or max_connections + table_cache*2 "
 
3925
      "(whichever is larger) number of files."),
3898
3926
   (char**) &open_files_limit, (char**) &open_files_limit, 0, GET_ULONG,
3899
3927
   REQUIRED_ARG, 0, 0, OS_FILE_LIMIT, 0, 1, 0},
3900
3928
  {"optimizer_prune_level", OPT_OPTIMIZER_PRUNE_LEVEL,
3901
 
   "Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows.",
 
3929
   N_("Controls the heuristic(s) applied during query optimization to prune "
 
3930
      "less-promising partial plans from the optimizer search space. Meaning: "
 
3931
      "0 - do not apply any heuristic, thus perform exhaustive search; "
 
3932
      "1 - prune plans based on number of retrieved rows."),
3902
3933
   (char**) &global_system_variables.optimizer_prune_level,
3903
3934
   (char**) &max_system_variables.optimizer_prune_level,
3904
3935
   0, GET_ULONG, OPT_ARG, 1, 0, 1, 0, 1, 0},
3905
3936
  {"optimizer_search_depth", OPT_OPTIMIZER_SEARCH_DEPTH,
3906
 
   "Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Smaller values than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value; if set to MAX_TABLES+2, the optimizer will switch to the original find_best (used for testing/comparison).",
 
3937
   N_("Maximum depth of search performed by the query optimizer. Values "
 
3938
      "larger than the number of relations in a query result in better query "
 
3939
      "plans, but take longer to compile a query. Smaller values than the "
 
3940
      "number of tables in a relation result in faster optimization, but may "
 
3941
      "produce very bad query plans. If set to 0, the system will "
 
3942
      "automatically pick a reasonable value; if set to MAX_TABLES+2, the "
 
3943
      "optimizer will switch to the original find_best (used for "
 
3944
      "testing/comparison)."),
3907
3945
   (char**) &global_system_variables.optimizer_search_depth,
3908
3946
   (char**) &max_system_variables.optimizer_search_depth,
3909
3947
   0, GET_ULONG, OPT_ARG, MAX_TABLES+1, 0, MAX_TABLES+2, 0, 1, 0},
3910
3948
  {"plugin_dir", OPT_PLUGIN_DIR,
3911
 
   "Directory for plugins.",
 
3949
   N_("Directory for plugins."),
3912
3950
   (char**) &opt_plugin_dir_ptr, (char**) &opt_plugin_dir_ptr, 0,
3913
3951
   GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3914
3952
  {"plugin_load", OPT_PLUGIN_LOAD,
3915
 
   "Optional comma separated list of plugins to load, where each plugin is "
3916
 
   "identified by the name of the shared library. "
3917
 
   "[for example: --plugin_load=libmd5udf.so]",
 
3953
   N_("Optional comma separated list of plugins to load, where each plugin is "
 
3954
      "identified by the name of the shared library. "
 
3955
      "[for example: --plugin_load=libmd5udf.so]"),
3918
3956
   (char**) &opt_plugin_load, (char**) &opt_plugin_load, 0,
3919
3957
   GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3920
3958
  {"preload_buffer_size", OPT_PRELOAD_BUFFER_SIZE,
3921
 
   "The size of the buffer that is allocated when preloading indexes",
 
3959
   N_("The size of the buffer that is allocated when preloading indexes"),
3922
3960
   (char**) &global_system_variables.preload_buff_size,
3923
3961
   (char**) &max_system_variables.preload_buff_size, 0, GET_ULONG,
3924
3962
   REQUIRED_ARG, 32*1024L, 1024, 1024*1024*1024L, 0, 1, 0},
3925
3963
  {"query_alloc_block_size", OPT_QUERY_ALLOC_BLOCK_SIZE,
3926
 
   "Allocation block size for query parsing and execution",
 
3964
   N_("Allocation block size for query parsing and execution"),
3927
3965
   (char**) &global_system_variables.query_alloc_block_size,
3928
3966
   (char**) &max_system_variables.query_alloc_block_size, 0, GET_ULONG,
3929
3967
   REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
3930
3968
  {"query_prealloc_size", OPT_QUERY_PREALLOC_SIZE,
3931
 
   "Persistent buffer for query parsing and execution",
 
3969
   N_("Persistent buffer for query parsing and execution"),
3932
3970
   (char**) &global_system_variables.query_prealloc_size,
3933
3971
   (char**) &max_system_variables.query_prealloc_size, 0, GET_ULONG,
3934
3972
   REQUIRED_ARG, QUERY_ALLOC_PREALLOC_SIZE, QUERY_ALLOC_PREALLOC_SIZE,
3935
3973
   ULONG_MAX, 0, 1024, 0},
3936
3974
  {"range_alloc_block_size", OPT_RANGE_ALLOC_BLOCK_SIZE,
3937
 
   "Allocation block size for storing ranges during optimization",
 
3975
   N_("Allocation block size for storing ranges during optimization"),
3938
3976
   (char**) &global_system_variables.range_alloc_block_size,
3939
3977
   (char**) &max_system_variables.range_alloc_block_size, 0, GET_ULONG,
3940
3978
   REQUIRED_ARG, RANGE_ALLOC_BLOCK_SIZE, RANGE_ALLOC_BLOCK_SIZE, ULONG_MAX,
3941
3979
   0, 1024, 0},
3942
3980
  {"read_buffer_size", OPT_RECORD_BUFFER,
3943
 
   "Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value.",
 
3981
   N_("Each thread that does a sequential scan allocates a buffer of this "
 
3982
      "size for each table it scans. If you do many sequential scans, you may "
 
3983
      "want to increase this value."),
3944
3984
   (char**) &global_system_variables.read_buff_size,
3945
3985
   (char**) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
3946
3986
   128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, INT32_MAX, MALLOC_OVERHEAD, IO_SIZE,
3947
3987
   0},
3948
3988
  {"read_only", OPT_READONLY,
3949
 
   "Make all non-temporary tables read-only, with the exception for replication (slave) threads and users with the SUPER privilege",
 
3989
   N_("Make all non-temporary tables read-only, with the exception for "
 
3990
      "replication (slave) threads and users with the SUPER privilege"),
3950
3991
   (char**) &opt_readonly,
3951
3992
   (char**) &opt_readonly,
3952
3993
   0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 1, 0},
3953
3994
  {"read_rnd_buffer_size", OPT_RECORD_RND_BUFFER,
3954
 
   "When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks. If not set, then it's set to the value of record_buffer.",
 
3995
   N_("When reading rows in sorted order after a sort, the rows are read "
 
3996
      "through this buffer to avoid a disk seeks. If not set, then it's set "
 
3997
      "to the value of record_buffer."),
3955
3998
   (char**) &global_system_variables.read_rnd_buff_size,
3956
3999
   (char**) &max_system_variables.read_rnd_buff_size, 0,
3957
4000
   GET_ULONG, REQUIRED_ARG, 256*1024L, 64 /*IO_SIZE*2+MALLOC_OVERHEAD*/ ,
3960
4003
   "Alias for read_buffer_size",
3961
4004
   (char**) &global_system_variables.read_buff_size,
3962
4005
   (char**) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
3963
 
   128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, INT32_MAX, MALLOC_OVERHEAD, IO_SIZE, 0},
 
4006
   128*1024L, IO_SIZE*2+MALLOC_OVERHEAD,
 
4007
   INT32_MAX, MALLOC_OVERHEAD, IO_SIZE, 0},
3964
4008
  {"relay_log_purge", OPT_RELAY_LOG_PURGE,
3965
 
   "0 = do not purge relay logs. 1 = purge them as soon as they are no more needed.",
 
4009
   N_("0 = do not purge relay logs. "
 
4010
      "1 = purge them as soon as they are no more needed."),
3966
4011
   (char**) &relay_log_purge,
3967
4012
   (char**) &relay_log_purge, 0, GET_BOOL, NO_ARG,
3968
4013
   1, 0, 1, 0, 1, 0},
3969
4014
  {"relay_log_space_limit", OPT_RELAY_LOG_SPACE_LIMIT,
3970
 
   "Maximum space to use for all relay logs.",
 
4015
   N_("Maximum space to use for all relay logs."),
3971
4016
   (char**) &relay_log_space_limit,
3972
4017
   (char**) &relay_log_space_limit, 0, GET_ULL, REQUIRED_ARG, 0L, 0L,
3973
4018
   (int64_t) ULONG_MAX, 0, 1, 0},
3974
4019
  {"slave_compressed_protocol", OPT_SLAVE_COMPRESSED_PROTOCOL,
3975
 
   "Use compression on master/slave protocol.",
 
4020
   N_("Use compression on master/slave protocol."),
3976
4021
   (char**) &opt_slave_compressed_protocol,
3977
4022
   (char**) &opt_slave_compressed_protocol,
3978
4023
   0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 1, 0},
3979
4024
  {"slave_net_timeout", OPT_SLAVE_NET_TIMEOUT,
3980
 
   "Number of seconds to wait for more data from a master/slave connection before aborting the read.",
 
4025
   N_("Number of seconds to wait for more data from a master/slave connection "
 
4026
      "before aborting the read."),
3981
4027
   (char**) &slave_net_timeout, (char**) &slave_net_timeout, 0,
3982
4028
   GET_ULONG, REQUIRED_ARG, SLAVE_NET_TIMEOUT, 1, LONG_TIMEOUT, 0, 1, 0},
3983
4029
  {"slave_transaction_retries", OPT_SLAVE_TRANS_RETRIES,
3984
 
   "Number of times the slave SQL thread will retry a transaction in case "
3985
 
   "it failed with a deadlock or elapsed lock wait timeout, "
3986
 
   "before giving up and stopping.",
 
4030
   N_("Number of times the slave SQL thread will retry a transaction in case "
 
4031
      "it failed with a deadlock or elapsed lock wait timeout, "
 
4032
      "before giving up and stopping."),
3987
4033
   (char**) &slave_trans_retries, (char**) &slave_trans_retries, 0,
3988
4034
   GET_ULONG, REQUIRED_ARG, 10L, 0L, (int64_t) ULONG_MAX, 0, 1, 0},
3989
4035
  {"slave-allow-batching", OPT_SLAVE_ALLOW_BATCHING,
3990
 
   "Allow slave to batch requests.",
 
4036
   N_("Allow slave to batch requests."),
3991
4037
   (char**) &slave_allow_batching, (char**) &slave_allow_batching,
3992
4038
   0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 1, 0},
3993
4039
  {"slow_launch_time", OPT_SLOW_LAUNCH_TIME,
3994
 
   "If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented.",
 
4040
   N_("If creating the thread takes longer than this value (in seconds), the "
 
4041
      "Slow_launch_threads counter will be incremented."),
3995
4042
   (char**) &slow_launch_time, (char**) &slow_launch_time, 0, GET_ULONG,
3996
4043
   REQUIRED_ARG, 2L, 0L, LONG_TIMEOUT, 0, 1, 0},
3997
4044
  {"sort_buffer_size", OPT_SORT_BUFFER,
3998
 
   "Each thread that needs to do a sort allocates a buffer of this size.",
 
4045
   N_("Each thread that needs to do a sort allocates a buffer of this size."),
3999
4046
   (char**) &global_system_variables.sortbuff_size,
4000
4047
   (char**) &max_system_variables.sortbuff_size, 0, GET_ULONG, REQUIRED_ARG,
4001
4048
   MAX_SORT_MEMORY, MIN_SORT_MEMORY+MALLOC_OVERHEAD*2, ULONG_MAX,
4002
4049
   MALLOC_OVERHEAD, 1, 0},
4003
4050
  {"sync-binlog", OPT_SYNC_BINLOG,
4004
 
   "Synchronously flush binary log to disk after every #th event. "
4005
 
   "Use 0 (default) to disable synchronous flushing.",
 
4051
   N_("Synchronously flush binary log to disk after every #th event. "
 
4052
      "Use 0 (default) to disable synchronous flushing."),
4006
4053
   (char**) &sync_binlog_period, (char**) &sync_binlog_period, 0, GET_ULONG,
4007
4054
   REQUIRED_ARG, 0, 0, ULONG_MAX, 0, 1, 0},
4008
 
  {"sync-frm", OPT_SYNC_FRM, "Sync .frm to disk on create. Enabled by default.",
 
4055
  {"sync-frm", OPT_SYNC_FRM,
 
4056
   N_("Sync .frm to disk on create. Enabled by default."),
4009
4057
   (char**) &opt_sync_frm, (char**) &opt_sync_frm, 0, GET_BOOL, NO_ARG, 1, 0,
4010
4058
   0, 0, 0, 0},
4011
4059
  {"table_cache", OPT_TABLE_OPEN_CACHE,
4012
 
   "Deprecated; use --table_open_cache instead.",
 
4060
   N_("Deprecated; use --table_open_cache instead."),
4013
4061
   (char**) &table_cache_size, (char**) &table_cache_size, 0, GET_ULONG,
4014
4062
   REQUIRED_ARG, TABLE_OPEN_CACHE_DEFAULT, 1, 512*1024L, 0, 1, 0},
4015
4063
  {"table_definition_cache", OPT_TABLE_DEF_CACHE,
4016
 
   "The number of cached table definitions.",
 
4064
   N_("The number of cached table definitions."),
4017
4065
   (char**) &table_def_size, (char**) &table_def_size,
4018
4066
   0, GET_ULONG, REQUIRED_ARG, 128, 1, 512*1024L, 0, 1, 0},
4019
4067
  {"table_open_cache", OPT_TABLE_OPEN_CACHE,
4020
 
   "The number of cached open tables.",
 
4068
   N_("The number of cached open tables."),
4021
4069
   (char**) &table_cache_size, (char**) &table_cache_size, 0, GET_ULONG,
4022
4070
   REQUIRED_ARG, TABLE_OPEN_CACHE_DEFAULT, 1, 512*1024L, 0, 1, 0},
4023
4071
  {"table_lock_wait_timeout", OPT_TABLE_LOCK_WAIT_TIMEOUT,
4024
 
   "Timeout in seconds to wait for a table level lock before returning an "
4025
 
   "error. Used only if the connection has active cursors.",
 
4072
   N_("Timeout in seconds to wait for a table level lock before returning an "
 
4073
      "error. Used only if the connection has active cursors."),
4026
4074
   (char**) &table_lock_wait_timeout, (char**) &table_lock_wait_timeout,
4027
4075
   0, GET_ULONG, REQUIRED_ARG, 50, 1, 1024 * 1024 * 1024, 0, 1, 0},
4028
4076
  {"thread_cache_size", OPT_THREAD_CACHE_SIZE,
4029
 
   "How many threads we should keep in a cache for reuse.",
 
4077
   N_("How many threads we should keep in a cache for reuse."),
4030
4078
   (char**) &thread_cache_size, (char**) &thread_cache_size, 0, GET_ULONG,
4031
4079
   REQUIRED_ARG, 0, 0, 16384, 0, 1, 0},
4032
4080
  {"thread_pool_size", OPT_THREAD_CACHE_SIZE,
4033
 
   "How many threads we should create to handle query requests in case of 'thread_handling=pool-of-threads'",
 
4081
   N_("How many threads we should create to handle query requests in case of "
 
4082
      "'thread_handling=pool-of-threads'"),
4034
4083
   (char**) &thread_pool_size, (char**) &thread_pool_size, 0, GET_ULONG,
4035
4084
   REQUIRED_ARG, 20, 1, 16384, 0, 1, 0},
4036
4085
  {"thread_stack", OPT_THREAD_STACK,
4037
 
   "The stack size for each thread.", (char**) &my_thread_stack_size,
4038
 
   (char**) &my_thread_stack_size, 0, GET_ULONG, REQUIRED_ARG,DEFAULT_THREAD_STACK,
 
4086
   N_("The stack size for each thread."),
 
4087
   (char**) &my_thread_stack_size,
 
4088
   (char**) &my_thread_stack_size, 0, GET_ULONG,
 
4089
   REQUIRED_ARG,DEFAULT_THREAD_STACK,
4039
4090
   1024L*128L, ULONG_MAX, 0, 1024, 0},
4040
4091
  { "time_format", OPT_TIME_FORMAT,
4041
 
    "The TIME format (for future).",
 
4092
    N_("The TIME format (for future)."),
4042
4093
    (char**) &opt_date_time_formats[DRIZZLE_TIMESTAMP_TIME],
4043
4094
    (char**) &opt_date_time_formats[DRIZZLE_TIMESTAMP_TIME],
4044
4095
    0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
4045
4096
  {"tmp_table_size", OPT_TMP_TABLE_SIZE,
4046
 
   "If an internal in-memory temporary table exceeds this size, MySQL will"
4047
 
   " automatically convert it to an on-disk MyISAM table.",
 
4097
   N_("If an internal in-memory temporary table exceeds this size, MySQL will"
 
4098
      " automatically convert it to an on-disk MyISAM table."),
4048
4099
   (char**) &global_system_variables.tmp_table_size,
4049
4100
   (char**) &max_system_variables.tmp_table_size, 0, GET_ULL,
4050
4101
   REQUIRED_ARG, 16*1024*1024L, 1024, MAX_MEM_TABLE_SIZE, 0, 1, 0},
4051
4102
  {"transaction_alloc_block_size", OPT_TRANS_ALLOC_BLOCK_SIZE,
4052
 
   "Allocation block size for transactions to be stored in binary log",
 
4103
   N_("Allocation block size for transactions to be stored in binary log"),
4053
4104
   (char**) &global_system_variables.trans_alloc_block_size,
4054
4105
   (char**) &max_system_variables.trans_alloc_block_size, 0, GET_ULONG,
4055
4106
   REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
4056
4107
  {"transaction_prealloc_size", OPT_TRANS_PREALLOC_SIZE,
4057
 
   "Persistent buffer for transactions to be stored in binary log",
 
4108
   N_("Persistent buffer for transactions to be stored in binary log"),
4058
4109
   (char**) &global_system_variables.trans_prealloc_size,
4059
4110
   (char**) &max_system_variables.trans_prealloc_size, 0, GET_ULONG,
4060
4111
   REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, ULONG_MAX, 0, 1024, 0},
4061
4112
  {"wait_timeout", OPT_WAIT_TIMEOUT,
4062
 
   "The number of seconds the server waits for activity on a connection before closing it.",
 
4113
   N_("The number of seconds the server waits for activity on a connection "
 
4114
      "before closing it."),
4063
4115
   (char**) &global_system_variables.net_wait_timeout,
4064
4116
   (char**) &max_system_variables.net_wait_timeout, 0, GET_ULONG,
4065
4117
   REQUIRED_ARG, NET_WAIT_TIMEOUT, 1, LONG_TIMEOUT,
4561
4613
      if (!(p= strstr(argument, "->")))
4562
4614
      {
4563
4615
        fprintf(stderr,
4564
 
                "Bad syntax in replicate-rewrite-db - missing '->'!\n");
 
4616
                _("Bad syntax in replicate-rewrite-db - missing '->'!\n"));
4565
4617
        exit(1);
4566
4618
      }
4567
4619
      val= p--;
4570
4622
      if (p == argument)
4571
4623
      {
4572
4624
        fprintf(stderr,
4573
 
                "Bad syntax in replicate-rewrite-db - empty FROM db!\n");
 
4625
                _("Bad syntax in replicate-rewrite-db - empty FROM db!\n"));
4574
4626
        exit(1);
4575
4627
      }
4576
4628
      *val= 0;
4580
4632
      if (!*val)
4581
4633
      {
4582
4634
        fprintf(stderr,
4583
 
                "Bad syntax in replicate-rewrite-db - empty TO db!\n");
 
4635
                _("Bad syntax in replicate-rewrite-db - empty TO db!\n"));
4584
4636
        exit(1);
4585
4637
      }
4586
4638
 
4609
4661
    {
4610
4662
      if (rpl_filter->add_do_table(argument))
4611
4663
      {
4612
 
        fprintf(stderr, "Could not add do table rule '%s'!\n", argument);
 
4664
        fprintf(stderr, _("Could not add do table rule '%s'!\n"), argument);
4613
4665
        exit(1);
4614
4666
      }
4615
4667
      break;
4618
4670
    {
4619
4671
      if (rpl_filter->add_wild_do_table(argument))
4620
4672
      {
4621
 
        fprintf(stderr, "Could not add do table rule '%s'!\n", argument);
 
4673
        fprintf(stderr, _("Could not add do table rule '%s'!\n"), argument);
4622
4674
        exit(1);
4623
4675
      }
4624
4676
      break;
4627
4679
    {
4628
4680
      if (rpl_filter->add_wild_ignore_table(argument))
4629
4681
      {
4630
 
        fprintf(stderr, "Could not add ignore table rule '%s'!\n", argument);
 
4682
        fprintf(stderr, _("Could not add ignore table rule '%s'!\n"), argument);
4631
4683
        exit(1);
4632
4684
      }
4633
4685
      break;
4636
4688
    {
4637
4689
      if (rpl_filter->add_ignore_table(argument))
4638
4690
      {
4639
 
        fprintf(stderr, "Could not add ignore table rule '%s'!\n", argument);
 
4691
        fprintf(stderr, _("Could not add ignore table rule '%s'!\n"), argument);
4640
4692
        exit(1);
4641
4693
      }
4642
4694
      break;
5052
5104
  {
5053
5105
    ptr= bit_lib->type_names;
5054
5106
    if (!*x)
5055
 
      fprintf(stderr, "No option given to %s\n", option);
 
5107
      fprintf(stderr, _("No option given to %s\n"), option);
5056
5108
    else
5057
 
      fprintf(stderr, "Wrong option to %s. Option(s) given: %s\n", option, x);
5058
 
    fprintf(stderr, "Alternatives are: '%s'", *ptr);
 
5109
      fprintf(stderr, _("Wrong option to %s. Option(s) given: %s\n"),
 
5110
              option, x);
 
5111
    fprintf(stderr, _("Alternatives are: '%s'"), *ptr);
5059
5112
    while (*++ptr)
5060
5113
      fprintf(stderr, ",'%s'", *ptr);
5061
5114
    fprintf(stderr, "\n");