summaryrefslogtreecommitdiff
path: root/scripts/convert-debug-for-diff.sh
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/convert-debug-for-diff.sh
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/convert-debug-for-diff.sh')
-rwxr-xr-xscripts/convert-debug-for-diff.sh25
1 files changed, 25 insertions, 0 deletions
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 $_;
+}