Test pt-upgrade host-to-host. Implement diff_query_times(). Export $test_diff from PerconaTest instead of doing diag() in no_diff().

This commit is contained in:
Daniel Nichter
2013-02-19 17:03:50 -07:00
parent 36e8696479
commit dcdeb606c8
44 changed files with 614 additions and 1011 deletions

View File

@@ -0,0 +1,9 @@
USE test;
-- Add 5 more rows so 01select.log causes a row diff.
INSERT INTO t VALUES
(null, 'g', '2013-01-01 00:00:07'),
(null, 'h', '2013-01-01 00:00:08'),
(null, 'i', '2013-01-01 00:00:09'),
(null, 'j', '2013-01-01 00:00:10'),
(null, 'k', '2013-01-01 00:00:11');

View File

@@ -1,3 +0,0 @@
# User@Host: root[root] @ localhost []
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
select i from t where i is not null

View File

@@ -1,44 +0,0 @@
# Query 1: ID 0x3C830E3839B916D7 at byte 0 _______________________________
# host1: 127.1:12345
# host2: 127.1:12348
# Found 1 differences in 1 samples:
# column counts 0
# column types 0
# column values 0
# row counts 1
# warning counts 0
# warning levels 0
# warnings 0
# host1 host2
# Errors 0 0
# Warnings 0 0
# Query_time
# sum 0 0
# min 0 0
# max 0 0
# avg 0 0
# pct_95 0 0
# stddev 0 0
# median 0 0
# row_count
# sum 4 3
# min 4 3
# max 4 3
# avg 4 3
# pct_95 4 3
# stddev 0 0
# median 4 3
use `test`;
select i from t where i is not null
/* 3C830E3839B916D7-1 */ select i from t where i is not null
# Row count differences
# Query ID host1 host2
# ================== ===== =====
# 3C830E3839B916D7-1 4 3
# Statistics
# events 1

View File

@@ -0,0 +1,4 @@
# User@Host: root[root] @ localhost []
# Query_time: 1 Lock_time: 0 Rows_sent: 7 Rows_examined: 7
use test;
select * from test.t order by id;

View File

@@ -0,0 +1,35 @@
########################################################################
# Query class 483E7FA163F8DA7B
########################################################################
Reporting class because it has diffs, but hasn't been reported yet.
Total queries 1
Unique queries 1
Discarded queries 0
select * from test.t order by id
##
## Row diffs: 1
##
-- 1.
@ first 3 of 5 missing rows
> 7,g,2013-01-01 00:00:07
> 8,h,2013-01-01 00:00:08
> 9,i,2013-01-01 00:00:09
select * from test.t order by id
########################################################################
# Stats
########################################################################
failed_queries 0
queries_filtered 0
queries_no_diffs 0
queries_read 1
queries_with_diffs 1
queries_with_errors 0

View File

@@ -1,8 +1,16 @@
DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
USE test;
create table t (i int);
insert into t values (1), (2), (3);
DROP DATABASE IF EXISTS tmp_db;
CREATE DATABASE tmp_db;
CREATE TABLE t (
id int(10) NOT NULL AUTO_INCREMENT,
username varchar(8) default NULL,
last_login datetime default NULL,
PRIMARY KEY (`id`)
);
INSERT INTO t VALUES
(null, 'a', '2013-01-01 00:00:01'),
(null, 'b', '2013-01-01 00:00:02'),
(null, 'c', '2013-01-01 00:00:03'),
(null, 'd', '2013-01-01 00:00:04'),
(null, 'e', '2013-01-01 00:00:05'),
(null, 'f', '2013-01-01 00:00:06');