Add 5.6 sample for t/pqd/explain.t test.

This commit is contained in:
Daniel Nichter
2012-12-04 00:44:32 +00:00
parent 526a12438e
commit 7d896e5c49
2 changed files with 66 additions and 8 deletions

View File

@@ -23,9 +23,6 @@ my $dbh = $sb->get_dbh_for('master');
if ( !$dbh ) {
plan skip_all => 'Cannot connect to sandbox master';
}
else {
plan tests => 6;
}
my $sample = "t/pt-query-digest/samples/";
@@ -90,7 +87,6 @@ ok(
'Analysis for slow007 with --explain, failed',
);
# #############################################################################
# Issue 1196: mk-query-digest --explain is broken
# #############################################################################
@@ -102,9 +98,9 @@ ok(
'--report-format', 'profile,query_report',
"$trunk/t/pt-query-digest/samples/issue_1196.log",)
},
($sandbox_version ge '5.1'
? "t/pt-query-digest/samples/issue_1196-output.txt"
: "t/pt-query-digest/samples/issue_1196-output-5.0.txt"),
( $sandbox_version eq '5.6' ? "$sample/issue_1196-output-5.6.txt"
: $sandbox_version ge '5.1' ? "$sample/issue_1196-output.txt"
: "$sample/issue_1196-output-5.0.txt"),
),
"--explain sparkline uses event db and doesn't crash ea (issue 1196"
);
@@ -114,4 +110,4 @@ ok(
# #############################################################################
$sb->wipe_clean($dbh);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
exit;
done_testing;

View File

@@ -0,0 +1,62 @@
# Profile
# Rank Query ID Response time Calls R/Call Apdx V/M EXPLAIN Item
# ==== ================== ============= ===== ====== ==== ===== ======= ========
# 1 0xD4B6A5CD2F2F485C 0.2148 100.0% 1 0.2148 1.00 0.00 TF>aa SELECT t
# Query 1: 0 QPS, 0x concurrency, ID 0xD4B6A5CD2F2F485C at byte 0 ________
# This item is included in the report because it matches --limit.
# Scores: Apdex = 1.00 [1.0]*, V/M = 0.00
# EXPLAIN sparkline: TF>aa
# Query_time sparkline: | ^ |
# Time range: all events occurred at 2010-12-14 16:12:28
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 1
# Exec time 100 215ms 215ms 215ms 215ms 215ms 0 215ms
# Lock time 99 162us 162us 162us 162us 162us 0 162us
# Rows sent 100 10 10 10 10 10 0 10
# Rows examine 100 1.96k 1.96k 1.96k 1.96k 1.96k 0 1.96k
# Query size 100 82 82 82 82 82 0 82
# String:
# Databases issue_1196
# Hosts localhost
# Users root
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms ################################################################
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `issue_1196` LIKE 't'\G
# SHOW CREATE TABLE `issue_1196`.`t`\G
# EXPLAIN /*!50100 PARTITIONS*/
select t.a, count(*) from t join t t2 using(a) group by 1 order by 2 desc limit 10\G
# *************************** 1. row ***************************
# id: 1
# select_type: SIMPLE
# table: t
# partitions: NULL
# type: ALL
# possible_keys: NULL
# key: NULL
# key_len: NULL
# ref: NULL
# rows: 14
# Extra: Using temporary; Using filesort
# *************************** 2. row ***************************
# id: 1
# select_type: SIMPLE
# table: t2
# partitions: NULL
# type: ALL
# possible_keys: NULL
# key: NULL
# key_len: NULL
# ref: NULL
# rows: 14
# Extra: Using where; Using join buffer (Block Nested Loop)