diff options
author | Michael Widenius <monty@askmonty.org> | 2010-08-25 01:44:50 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-08-25 01:44:50 +0300 |
commit | 58a75bb18b2a4080c8fae77024afed37f1be1314 (patch) | |
tree | 4d9d65f5747636d6dea9295e79464108df24a9a2 /scripts | |
parent | 99b79db5dca6909456a40d859298ba3992b145da (diff) | |
parent | a82671178919afba86ddfdf2b64321eb9afff8e5 (diff) | |
download | mariadb-git-58a75bb18b2a4080c8fae77024afed37f1be1314.tar.gz |
Automerge with 5.1
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.am | 7 | ||||
-rwxr-xr-x | scripts/convert-debug-for-diff.sh | 25 |
2 files changed, 30 insertions, 2 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index b74e7b8df8b..be9354bd628 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -37,7 +37,8 @@ bin_SCRIPTS = @server_scripts@ \ mysqld_multi noinst_SCRIPTS = make_binary_distribution \ - make_sharedlib_distribution + make_sharedlib_distribution \ + convert-debug-for-diff EXTRA_SCRIPTS = make_binary_distribution.sh \ make_sharedlib_distribution.sh \ @@ -59,7 +60,8 @@ EXTRA_SCRIPTS = make_binary_distribution.sh \ mysqlhotcopy.sh \ mysqldumpslow.sh \ mysqld_multi.sh \ - mysqld_safe.sh + mysqld_safe.sh \ + convert-debug-for-diff.sh EXTRA_DIST = $(EXTRA_SCRIPTS) \ mysqlaccess.conf \ @@ -91,6 +93,7 @@ CLEANFILES = @server_scripts@ \ mysqlhotcopy \ mysqldumpslow \ mysqld_multi \ + convert-debug-for-diff \ $(EXTRA_PROGRAMS) pkgplugindir = $(pkglibdir)/plugin diff --git a/scripts/convert-debug-for-diff.sh b/scripts/convert-debug-for-diff.sh new file mode 100755 index 00000000000..b6c837504cb --- /dev/null +++ b/scripts/convert-debug-for-diff.sh @@ -0,0 +1,25 @@ +#!/usr/bin/perl -i +# +# This script converts all numbers that look like addresses or memory sizes, +# in a debug files generated by --debug (like mysqld --debug), to #. +# The script also deletes all thread id's from the start of the line. + +# This allows you to easily compare the files (for example with diff) +# to find out what changes between different executions. +# This is extremely useful for comparing two mysqld versions to see +# why things now work differently. + +# The script converts the files in place. +# +# Typical usage: +# +# convert-debug-for-diff /tmp/mysqld.trace /tmp/mysqld-old.trace +# diff /tmp/mysqld.trace /tmp/mysqld-old.trace + +while (<>) +{ + s/^T@[0-9]+\s*://g; + s/0x[0-9a-f]+(\s|\n|\))/#$1/g; + s/size: [0-9]+/size: #/g; + print $_; +} |