2009-12-22 10:35:56 +01:00
|
|
|
#
|
|
|
|
# mysqld --help
|
|
|
|
#
|
|
|
|
--source include/not_embedded.inc
|
|
|
|
|
|
|
|
#
|
|
|
|
# force lower-case-table-names=1 (linux/macosx have different defaults)
|
|
|
|
# force symbolic-links=0 (valgrind build has a different default)
|
|
|
|
#
|
2010-09-30 15:52:39 +02:00
|
|
|
|
2009-12-22 10:35:56 +01:00
|
|
|
exec $MYSQLD_BOOTSTRAP_CMD --symbolic-links=0 --lower-case-table-names=1 --help --verbose > $MYSQL_TMP_DIR/mysqld--help.txt 2>&1;
|
|
|
|
|
2010-09-30 15:52:39 +02:00
|
|
|
# The inline perl code below will copy $MYSQL_TMP_DIR/mysqld--help.txt
|
|
|
|
# to output, but filter away some variable stuff (e.g. paths).
|
|
|
|
|
2009-12-22 10:35:56 +01:00
|
|
|
perl;
|
2010-09-30 15:52:39 +02:00
|
|
|
# Variables which we don't want to display in the result file since
|
|
|
|
# their paths may vary:
|
2010-01-05 13:55:58 +01:00
|
|
|
@skipvars=qw/basedir open-files-limit general-log-file log plugin-dir
|
2010-01-06 11:59:01 +01:00
|
|
|
log-slow-queries pid-file slow-query-log-file
|
2010-09-30 15:52:39 +02:00
|
|
|
datadir slave-load-tmpdir tmpdir socket/;
|
|
|
|
|
|
|
|
# Plugins which may or may not be there:
|
Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.
Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.
Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost.
The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.
Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
client/mysqldump.c:
Pass my_free directly as its signature is compatible with the
callback type -- which wasn't the case for free_table_ent.
2010-07-08 18:20:08 -03:00
|
|
|
@plugins=qw/innodb ndb archive blackhole federated partition ndbcluster debug temp-pool ssl des-key-file
|
2010-01-26 22:05:41 +01:00
|
|
|
thread-concurrency super-large-pages mutex-deadlock-detector null-audit/;
|
2010-09-30 15:52:39 +02:00
|
|
|
|
|
|
|
# And substitute the content some environment variables with their
|
|
|
|
# names:
|
|
|
|
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_LIBDIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR/;
|
|
|
|
|
2009-12-22 10:35:56 +01:00
|
|
|
$re1=join('|', @skipvars, @plugins);
|
|
|
|
$re2=join('|', @plugins);
|
|
|
|
$skip=0;
|
|
|
|
open(F, '<', "$ENV{MYSQL_TMP_DIR}/mysqld--help.txt") or die;
|
|
|
|
while (<F>) {
|
|
|
|
next if 1../The following groups are read/;
|
2010-01-06 17:57:10 +00:00
|
|
|
# formatting, skip line consisting entirely of dashes and blanks
|
2010-05-17 19:28:50 +04:00
|
|
|
next if /^[\- ]+\s?$/;
|
2010-01-06 17:57:10 +00:00
|
|
|
next if /Value \(after reading options\)/; # skip table header
|
2009-12-22 10:35:56 +01:00
|
|
|
next if /^($re1) /;
|
|
|
|
next if /^($re2)-/;
|
|
|
|
$skip=0 if /^ -/;
|
|
|
|
$skip=1 if / --($re2)\b/;
|
2009-12-24 12:30:23 +01:00
|
|
|
y!\\!/!;
|
2010-01-06 17:57:10 +00:00
|
|
|
s/[ ]+/ /; # squeeze spaces to remove table formatting
|
|
|
|
# fixes for 32-bit
|
2009-12-22 10:35:56 +01:00
|
|
|
s/\b4294967295\b/18446744073709551615/;
|
|
|
|
s/\b2146435072\b/9223372036853727232/;
|
|
|
|
s/\b196608\b/262144/;
|
2009-12-24 12:30:23 +01:00
|
|
|
foreach $var (@env) { s/$ENV{$var}/$var/ }
|
2009-12-22 10:35:56 +01:00
|
|
|
next if /use --skip-(use-)?symbolic-links to disable/; # for valgrind, again
|
|
|
|
next if $skip;
|
|
|
|
print;
|
|
|
|
}
|
|
|
|
close F;
|
|
|
|
EOF
|
|
|
|
|