summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMichael Widenius <monty@mysql.com>2010-08-18 10:52:57 +0300
committerMichael Widenius <monty@mysql.com>2010-08-18 10:52:57 +0300
commit909e4eb08d7ea38cf09575756cff79648e326fd5 (patch)
tree84729e5a7b409cbe8b58a888fb76762ed3900f0d /scripts
parent6795a545e382a2de7104cdc57e0a2834e4aa9b67 (diff)
downloadmariadb-git-909e4eb08d7ea38cf09575756cff79648e326fd5.tar.gz
Added verbose mode to recovery
More DBUG Added convert-debug-for-diff Added missing (from last push) federated test case .bzrignore: Ignore generated files mysql-test/README: Updated documentation for --extern mysql-test/suite/federated/federated_bug_32426.result: Added test for federatedx mysql-test/suite/federated/federated_bug_32426.test: Added test for federatedx scripts/Makefile.am: Added convert-debug-for-diff scripts/convert-debug-for-diff.sh: Added script for converting sql/log.cc: Added DBUG sql/mysqld.cc: Added DBUG storage/maria/ma_recovery.c: If verbose, write dirty pages (for debugging) storage/maria/ma_static.c: Added verbose mode to recovery storage/maria/maria_def.h: Added verbose mode to recovery storage/maria/maria_read_log.c: Added verbose mode to recovery
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am7
-rwxr-xr-xscripts/convert-debug-for-diff.sh25
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..2c4c86acd3c
--- /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]+://g;
+ s/0x[0-9a-f]+(\s|\n|\))/#$1/g;
+ s/size: [0-9]+/size: #/g;
+ print $_;
+}