diff -crB original/mysql_filter_slow_log.php changed/mysql_filter_slow_log.php *** original/mysql_filter_slow_log.php 2007-05-08 10:05:30.000000000 +0200 --- changed/mysql_filter_slow_log.php 2009-09-21 17:09:50.000000000 +0200 *************** *** 143,148 **** --- 143,157 ---- Remaining default ordering options will keep their relative positions. EOD; + /** + * mf + */ + function preproc_query($query) { + $pattern = "/'([^']*)'/"; + $output = preg_replace ($pattern, "'***'", $query); + + return $output!=null ? $output : $query; + } function cmp_queries(&$a, &$b) { foreach($GLOBALS['new_sorting'] as $i) *************** *** 158,163 **** --- 167,178 ---- } function process_query(&$queries, $query, $no_duplicates, $user, $host, $timestamp, $query_time, $ls) { + global $preproc; + + if($preproc) { + $query = preproc_query($query); + } + if($no_duplicates) $queries[$query][$user . ' @ ' . $host][$timestamp] = $query_time; else *************** *** 306,311 **** --- 321,327 ---- case '--no-output': $no_output = TRUE; break; case '--incremental': $incremental = TRUE; break; case '--details': $details = TRUE; break; + case '--preproc': $preproc = TRUE; break; case '--help': fwrite(STDERR, $usage); exit(0); default: if(!$infile && is_file($arg)) { *************** *** 424,430 **** } } else if($in_query && $line[2] == 'Q') { // # Query_time: 0 Lock_time: 0 Rows_sent: 0 Rows_examined: 156 $numbers = explode(': ', substr($line, 12)); ! $query_time = array((int) $numbers[1], (int) $numbers[2], (int) $numbers[3], (int) $numbers[4]); $in_query = $query_time[0] >= $min_query_time || ($min_rows_examined && $query_time[3] >= $min_rows_examined); } } else if($in_query) { --- 440,446 ---- } } else if($in_query && $line[2] == 'Q') { // # Query_time: 0 Lock_time: 0 Rows_sent: 0 Rows_examined: 156 $numbers = explode(': ', substr($line, 12)); ! $query_time = array((int) $numbers[1], (int) $numbers[2], (int) $numbers[3], (int) $numbers[4], (int) ($numbers[1] - $numbers[2])); $in_query = $query_time[0] >= $min_query_time || ($min_rows_examined && $query_time[3] >= $min_rows_examined); } } else if($in_query) { *************** *** 604,607 **** $con->commit(); unset($con); } ! ?> \ No newline at end of file --- 620,623 ---- $con->commit(); unset($con); } ! ?>