MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mysqld--help.inc
1 #
2 # mysqld --help
3 #
4 --source include/not_embedded.inc
5 
6 #
7 # force lower-case-table-names=1 (linux/macosx have different defaults)
8 # force symbolic-links=0 (valgrind build has a different default)
9 #
10 
11 exec $MYSQLD_BOOTSTRAP_CMD --symbolic-links=0 --lower-case-table-names=1 --help --verbose > $MYSQL_TMP_DIR/mysqld--help.txt 2>/dev/null;
12 
13 # The inline perl code below will copy $MYSQL_TMP_DIR/mysqld--help.txt
14 # to output, but filter away some variable stuff (e.g. paths).
15 
16 perl;
17  # Variables which we don't want to display in the result file since
18  # their paths may vary:
19  @skipvars=qw/basedir open-files-limit general-log-file plugin-dir
20  pid-file slow-query-log-file
21  datadir slave-load-tmpdir tmpdir socket table-definition-cache table-open-cache/;
22 
23  # Plugins which may or may not be there:
24  @plugins=qw/innodb ndb ndbinfo archive blackhole federated partition ndbcluster debug temp-pool ssl des-key-file
25  thread-concurrency super-large-pages mutex-deadlock-detector null-audit
26  sha256-password-private-key-path sha256-password-public-key-path/;
27 
28  # And substitute the content some environment variables with their
29  # names:
30  @env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR/;
31 
32  $re1=join('|', @skipvars, @plugins);
33  $re2=join('|', @plugins);
34  $skip=0;
35  open(F, '<', "$ENV{MYSQL_TMP_DIR}/mysqld--help.txt") or die;
36  while (<F>) {
37  next if 1../The following groups are read/;
38  # formatting, skip line consisting entirely of dashes and blanks
39  next if /^[\- ]+\s?$/;
40  next if /Value \(after reading options\)/; # skip table header
41  next if /^($re1) /;
42  next if /^($re2)-/;
43  $skip=0 if /^ -/;
44  $skip=1 if / --($re2)\b/;
45  y!\\!/!;
46  s/[ ]+/ /; # squeeze spaces to remove table formatting
47  # fixes for 32-bit
48  s/\b4294967295\b/18446744073709551615/;
49  s/\b2146435072\b/9223372036853727232/;
50  s/\b196608\b/262144/;
51  # Replacing port number with string
52  s/^port \d+/port ####/;
53  foreach $var (@env) { s/$ENV{$var}/$var/ }
54  next if /use --skip-(use-)?symbolic-links to disable/; # for valgrind, again
55  next if $skip;
56  print;
57  }
58  close F;
59 EOF
60