mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-24 21:35:00 +00:00
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:
12
t/pt-upgrade/samples/001/insert.txt
Normal file
12
t/pt-upgrade/samples/001/insert.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
########################################################################
|
||||
# Stats
|
||||
########################################################################
|
||||
|
||||
failed_queries 0
|
||||
not_select 1
|
||||
queries_filtered 0
|
||||
queries_no_diffs 0
|
||||
queries_read 1
|
||||
queries_with_diffs 0
|
||||
queries_with_errors 0
|
@@ -1,112 +0,0 @@
|
||||
|
||||
# Query 1: ID 0xC11622E1B2607157 at byte 0 _______________________________
|
||||
# host1: 127.1:12345
|
||||
# host2: 127.1:12348
|
||||
# Found 0 differences in 1 samples:
|
||||
# checksums 0
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# row counts 0
|
||||
# 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 7 7
|
||||
# min 7 7
|
||||
# max 7 7
|
||||
# avg 7 7
|
||||
# pct_95 7 7
|
||||
# stddev 0 0
|
||||
# median 7 7
|
||||
# Converted non-SELECT:
|
||||
# delete from t where id is not null
|
||||
# Fingerprint
|
||||
# select * from t where id is not ?
|
||||
select * from t where id is not null
|
||||
|
||||
# Query 2: ID 0xD7D2F2B7AB4602A4 at byte 0 _______________________________
|
||||
# host1: 127.1:12345
|
||||
# host2: 127.1:12348
|
||||
# Found 0 differences in 1 samples:
|
||||
# checksums 0
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# row counts 0
|
||||
# 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 2 2
|
||||
# min 2 2
|
||||
# max 2 2
|
||||
# avg 2 2
|
||||
# pct_95 2 2
|
||||
# stddev 0 0
|
||||
# median 2 2
|
||||
# Fingerprint
|
||||
# select id from test.t where id > ?
|
||||
use `test`;
|
||||
select id from test.t where id > 3
|
||||
|
||||
# Query 3: ID 0x37BA5C52702C61C6 at byte 0 _______________________________
|
||||
# host1: 127.1:12345
|
||||
# host2: 127.1:12348
|
||||
# Found 0 differences in 1 samples:
|
||||
# checksums 0
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# row counts 0
|
||||
# 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 1 1
|
||||
# min 1 1
|
||||
# max 1 1
|
||||
# avg 1 1
|
||||
# pct_95 1 1
|
||||
# stddev 0 0
|
||||
# median 1 1
|
||||
# Converted non-SELECT:
|
||||
# update t set name='changed' where id=0
|
||||
# Fingerprint
|
||||
# select name=? from t where id=?
|
||||
select name='changed' from t where id=0
|
||||
|
||||
# Statistics
|
||||
# convert_to_select_failed 2
|
||||
# convert_to_select_ok 2
|
||||
# events 5
|
@@ -1,16 +0,0 @@
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
use test;
|
||||
select id from test.t where id > 3;
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
insert into t values (9, 'nine', now());
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
update t set name='changed' where id=0;
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
delete from t where id is not null;
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
truncate table t;
|
@@ -1,37 +0,0 @@
|
||||
|
||||
# Query 1: ID 0xD7D2F2B7AB4602A4 at byte 0 _______________________________
|
||||
# host1: 127.1:12345
|
||||
# host2: 127.1:12348
|
||||
# Found 0 differences in 1 samples:
|
||||
# checksums 0
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# row counts 0
|
||||
# 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 2 2
|
||||
# min 2 2
|
||||
# max 2 2
|
||||
# avg 2 2
|
||||
# pct_95 2 2
|
||||
# stddev 0 0
|
||||
# median 2 2
|
||||
use `test`;
|
||||
select id from test.t where id > 3
|
||||
|
||||
# Statistics
|
||||
# events 5
|
||||
# not_select 4
|
@@ -1,63 +0,0 @@
|
||||
|
||||
# Query 1: ID 0x3B323396273BC4C7 at byte 0 _______________________________
|
||||
# Found 0 differences in 1 samples:
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# column values 0
|
||||
# row counts 0
|
||||
# warning counts 0
|
||||
# warning levels 0
|
||||
# warnings 0
|
||||
# P=12345,h=127.1,p=...,u=msandbox P=12348,h=127.1,p=...,u=msandbox
|
||||
# Errors 1 1
|
||||
# Warnings 1 1
|
||||
# Query_time
|
||||
# sum 0 0
|
||||
# min 0 0
|
||||
# max 0 0
|
||||
# avg 0 0
|
||||
# pct_95 0 0
|
||||
# stddev 0 0
|
||||
# median 0 0
|
||||
select borked
|
||||
/* 3B323396273BC4C7-1 */ select borked
|
||||
|
||||
# Query 2: ID 0x30B1FA07C660C2A8 at byte 0 _______________________________
|
||||
# Found 0 differences in 2 samples:
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# column values 0
|
||||
# row counts 0
|
||||
# warning counts 0
|
||||
# warning levels 0
|
||||
# warnings 0
|
||||
# P=12345,h=127.1,p=...,u=msandbox P=12348,h=127.1,p=...,u=msandbox
|
||||
# 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 2 2
|
||||
# min 1 1
|
||||
# max 1 1
|
||||
# avg 1 1
|
||||
# pct_95 1 1
|
||||
# stddev 0 0
|
||||
# median 1 1
|
||||
select * from t where name='jane'
|
||||
|
||||
# Errors
|
||||
# Query ID Host Error
|
||||
# ================== ================================ ========================
|
||||
# 3B323396273BC4C7-1 P=12348,h=127.1,p=...,u=msandbox Failed to execute query: DBD::mysql::st execute failed: Unknown column 'borked' in 'field list' [for Statement "select borked"] at mk-upgrade line 0, <$fh> line 2.
|
||||
|
||||
# Statistics
|
||||
# CompareResults_after_execute_skipped 2
|
||||
# CompareResults_execute_error 2
|
||||
# events 3
|
@@ -1,10 +0,0 @@
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 0 Rows_examined: 0
|
||||
use test;
|
||||
select * from t where name='bob';
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 0 Rows_examined: 0
|
||||
select borked;
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
select * from t where name='jane';
|
@@ -1,66 +0,0 @@
|
||||
|
||||
# Query 1: ID 0x3B323396273BC4C7 at byte 0 _______________________________
|
||||
# Found 0 differences in 1 samples:
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# column values 0
|
||||
# row counts 0
|
||||
# warning counts 0
|
||||
# warning levels 0
|
||||
# warnings 0
|
||||
# P=12345,h=127.1,p=...,u=msandbox P=12348,h=127.1,p=...,u=msandbox
|
||||
# Errors 1 1
|
||||
# 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
|
||||
select borked
|
||||
/* 3B323396273BC4C7-1 */ select borked
|
||||
|
||||
# Query 2: ID 0x30B1FA07C660C2A8 at byte 0 _______________________________
|
||||
# Found 0 differences in 2 samples:
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# column values 0
|
||||
# row counts 0
|
||||
# warning counts 0
|
||||
# warning levels 0
|
||||
# warnings 0
|
||||
# P=12345,h=127.1,p=...,u=msandbox P=12348,h=127.1,p=...,u=msandbox
|
||||
# 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 2 2
|
||||
# min 1 1
|
||||
# max 1 1
|
||||
# avg 1 1
|
||||
# pct_95 1 1
|
||||
# stddev 0 0
|
||||
# median 1 1
|
||||
select * from t where name='jane'
|
||||
|
||||
# Errors
|
||||
# Query ID Host Error
|
||||
# ================== ================================ ========================
|
||||
# 3B323396273BC4C7-1 P=12348,h=127.1,p=...,u=msandbox Failed to execute query: DBD::mysql::st execute failed: Unknown column 'borked' in 'field list' [for Statement "select borked"] at ../mk-upgrade line 7059, <$fh> line 2.
|
||||
|
||||
# Statistics
|
||||
# CompareResults_after_execute_skipped 2
|
||||
# CompareResults_execute_error 2
|
||||
# CompareWarnings_after_execute_skipped 2
|
||||
# CompareWarnings_before_execute_error 2
|
||||
# CompareWarnings_execute_skipped 2
|
||||
# events 3
|
@@ -1,3 +0,0 @@
|
||||
|
||||
# Statistics
|
||||
# events 7
|
@@ -1,32 +0,0 @@
|
||||
|
||||
# Query 1: ID 0x4AF1501167533D97 at byte 0 _______________________________
|
||||
# host1: 127.1:12345
|
||||
# host2: 127.1:12348
|
||||
# Found 0 differences in 7 samples:
|
||||
# checksums 0
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# row counts 0
|
||||
# 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 7 7
|
||||
# min 1 1
|
||||
# max 1 1
|
||||
# avg 1 1
|
||||
# pct_95 1 1
|
||||
# stddev 0 0
|
||||
# median 1 1
|
||||
select id, name, last_login from test.t where id=5
|
@@ -1,35 +0,0 @@
|
||||
|
||||
# Query 1: ID 0x4AF1501167533D97 at byte 0 _______________________________
|
||||
# host1: 127.1:12345
|
||||
# host2: 127.1:12348
|
||||
# Found 0 differences in 7 samples:
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# column values 0
|
||||
# row counts 0
|
||||
# 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 7 7
|
||||
# min 1 1
|
||||
# max 1 1
|
||||
# avg 1 1
|
||||
# pct_95 1 1
|
||||
# stddev 0 0
|
||||
# median 1 1
|
||||
select id, name, last_login from test.t where id=5
|
||||
|
||||
# Statistics
|
||||
# events 7
|
@@ -1,22 +0,0 @@
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
use test;
|
||||
select id, name, last_login from test.t where id=-1;
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
select id, name, last_login from test.t where id=0;
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
select id, name, last_login from test.t where id=1;
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
select id, name, last_login from test.t where id=2;
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
select id, name, last_login from test.t where id=3;
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
select id, name, last_login from test.t where id=4;
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
select id, name, last_login from test.t where id=5;
|
@@ -1,35 +0,0 @@
|
||||
|
||||
# Query 1: ID 0x4AF1501167533D97 at byte 0 _______________________________
|
||||
# host1: 127.1:12345
|
||||
# host2: 127.1:12348
|
||||
# Found 0 differences in 7 samples:
|
||||
# checksums 0
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# row counts 0
|
||||
# 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 7 7
|
||||
# min 1 1
|
||||
# max 1 1
|
||||
# avg 1 1
|
||||
# pct_95 1 1
|
||||
# stddev 0 0
|
||||
# median 1 1
|
||||
select id, name, last_login from test.t where id=5
|
||||
|
||||
# Statistics
|
||||
# events 7
|
@@ -1,36 +0,0 @@
|
||||
|
||||
# Query 1: ID 0x4AF1501167533D97 at byte 0 _______________________________
|
||||
# host1: 127.1:12345
|
||||
# host2: 127.1:12348
|
||||
# Found 0 differences in 1 samples:
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# column values 0
|
||||
# row counts 0
|
||||
# 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 1 1
|
||||
# min 1 1
|
||||
# max 1 1
|
||||
# avg 1 1
|
||||
# pct_95 1 1
|
||||
# stddev 0 0
|
||||
# median 1 1
|
||||
use `test`;
|
||||
select id, name, last_login from test.t where id=0
|
||||
|
||||
# Statistics
|
||||
# events 1
|
@@ -1,4 +0,0 @@
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
use test;
|
||||
select id, name, last_login from test.t where id=0;
|
@@ -1,36 +0,0 @@
|
||||
|
||||
# Query 1: ID 0x4AF1501167533D97 at byte 0 _______________________________
|
||||
# host1: 127.1:12345
|
||||
# host2: 127.1:12348
|
||||
# Found 0 differences in 1 samples:
|
||||
# checksums 0
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# row counts 0
|
||||
# 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 1 1
|
||||
# min 1 1
|
||||
# max 1 1
|
||||
# avg 1 1
|
||||
# pct_95 1 1
|
||||
# stddev 0 0
|
||||
# median 1 1
|
||||
use `test`;
|
||||
select id, name, last_login from test.t where id=0
|
||||
|
||||
# Statistics
|
||||
# events 1
|
11
t/pt-upgrade/samples/001/select.txt
Normal file
11
t/pt-upgrade/samples/001/select.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
########################################################################
|
||||
# Stats
|
||||
########################################################################
|
||||
|
||||
failed_queries 0
|
||||
queries_filtered 0
|
||||
queries_no_diffs 1
|
||||
queries_read 1
|
||||
queries_with_diffs 0
|
||||
queries_with_errors 0
|
@@ -1,18 +1,16 @@
|
||||
DROP DATABASE IF EXISTS test;
|
||||
CREATE DATABASE test;
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS t;
|
||||
CREATE TABLE `t` (
|
||||
`id` int(10) NOT NULL,
|
||||
`username` varchar(32) default NULL,
|
||||
`last_login` datetime default NULL,
|
||||
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
|
||||
(-1, 'banned', '2009-11-06 10:37:17'),
|
||||
(0, 'admin', '2001-11-07 12:01:40'),
|
||||
(1, 'bob', '2009-10-07 10:37:47'),
|
||||
(2, 'jane', '2009-11-07 11:37:97'),
|
||||
(3, 'susan', '2009-04-09 10:00:47'),
|
||||
(4, 'rick', '2009-10-03 10:37:22'),
|
||||
(5, 'tom', '2009-12-07 10:37:74');
|
||||
(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');
|
||||
|
9
t/pt-upgrade/samples/002/host2.sql
Normal file
9
t/pt-upgrade/samples/002/host2.sql
Normal 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');
|
@@ -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
|
@@ -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
|
4
t/pt-upgrade/samples/002/select_missing_rows.log
Normal file
4
t/pt-upgrade/samples/002/select_missing_rows.log
Normal 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;
|
35
t/pt-upgrade/samples/002/select_missing_rows.txt
Normal file
35
t/pt-upgrade/samples/002/select_missing_rows.txt
Normal 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
|
@@ -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');
|
||||
|
1
t/pt-upgrade/samples/003/conf
Normal file
1
t/pt-upgrade/samples/003/conf
Normal file
@@ -0,0 +1 @@
|
||||
no-read-only
|
@@ -1,4 +0,0 @@
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 1 Rows_examined: 1
|
||||
use test;
|
||||
SELECT SUM(total) FROM test.t WHERE id > 0
|
5
t/pt-upgrade/samples/003/host2.sql
Normal file
5
t/pt-upgrade/samples/003/host2.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
USE test;
|
||||
|
||||
-- Increase column size from 8 to 16 so insert.log causes
|
||||
-- a warning diff (value is truncated on host1).
|
||||
ALTER TABLE t CHANGE COLUMN username username varchar(16) default NULL;
|
38
t/pt-upgrade/samples/003/insert_truncate.warning.txt
Normal file
38
t/pt-upgrade/samples/003/insert_truncate.warning.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
########################################################################
|
||||
# Query class AAD020567F8398EE
|
||||
########################################################################
|
||||
|
||||
Reporting class because it has diffs, but hasn't been reported yet.
|
||||
|
||||
Total queries 1
|
||||
Unique queries 1
|
||||
Discarded queries 0
|
||||
|
||||
insert into t (id, username) values(?+)
|
||||
|
||||
##
|
||||
## Warning diffs: 1
|
||||
##
|
||||
|
||||
-- 1.
|
||||
|
||||
Code: 1265
|
||||
Level: Warning
|
||||
Message: Data truncated for column 'username' at row 1
|
||||
|
||||
vs.
|
||||
|
||||
No warning 1265
|
||||
|
||||
INSERT INTO t (id, username) VALUES (NULL, 'long_username')
|
||||
|
||||
########################################################################
|
||||
# Stats
|
||||
########################################################################
|
||||
|
||||
failed_queries 0
|
||||
queries_filtered 0
|
||||
queries_no_diffs 0
|
||||
queries_read 1
|
||||
queries_with_diffs 1
|
||||
queries_with_errors 0
|
4
t/pt-upgrade/samples/003/insert_truncate_warning.log
Normal file
4
t/pt-upgrade/samples/003/insert_truncate_warning.log
Normal file
@@ -0,0 +1,4 @@
|
||||
# User@Host: root[root] @ localhost []
|
||||
# Query_time: 1 Lock_time: 0 Rows_sent: 0 Rows_examined: 1
|
||||
use test;
|
||||
INSERT INTO t (id, username) VALUES (NULL, 'long_username');
|
@@ -1,44 +0,0 @@
|
||||
|
||||
# Query 1: ID 0xC1B1E457814417E4 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 1
|
||||
# row counts 0
|
||||
# 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 1 1
|
||||
# min 1 1
|
||||
# max 1 1
|
||||
# avg 1 1
|
||||
# pct_95 1 1
|
||||
# stddev 0 0
|
||||
# median 1 1
|
||||
use `test`;
|
||||
SELECT SUM(total) FROM test.t WHERE id > 0
|
||||
|
||||
/* C1B1E457814417E4-1 */ SELECT SUM(total) FROM test.t WHERE id > 0
|
||||
|
||||
|
||||
# Column value differences
|
||||
# Query ID Column host1 host2
|
||||
# ================== ========== ===== =====
|
||||
# C1B1E457814417E4-1 SUM(total) 14.68 13.68
|
||||
|
||||
# Statistics
|
||||
# events 1
|
@@ -2,10 +2,8 @@ DROP DATABASE IF EXISTS test;
|
||||
CREATE DATABASE test;
|
||||
USE test;
|
||||
CREATE TABLE t (
|
||||
id INT NOT NULL PRIMARY KEY,
|
||||
total DOUBLE NOT NULL
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO test.t VALUES
|
||||
(1, 1.23),
|
||||
(2, 4.56),
|
||||
(3, 7.89);
|
||||
id int(10) NOT NULL AUTO_INCREMENT,
|
||||
username varchar(8) default NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
INSERT INTO t VALUES (1, 'username');
|
||||
|
@@ -1,36 +0,0 @@
|
||||
|
||||
# Query 1: ID 0xF05C9711D543F5BF at byte 0 _______________________________
|
||||
# host1: 127.1:12345
|
||||
# host2: 127.1:12348
|
||||
# Found 0 differences in 1 samples:
|
||||
# column counts 0
|
||||
# column types 0
|
||||
# column values 0
|
||||
# row counts 0
|
||||
# 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 1 1
|
||||
# min 1 1
|
||||
# max 1 1
|
||||
# avg 1 1
|
||||
# pct_95 1 1
|
||||
# stddev 0 0
|
||||
# median 1 1
|
||||
use `test`;
|
||||
SELECT (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP('2012-09-16 10:16:36')) / 60, SLEEP(1)
|
||||
|
||||
# Statistics
|
||||
# events 1
|
1
t/pt-upgrade/samples/004/select_function.sed
Normal file
1
t/pt-upgrade/samples/004/select_function.sed
Normal file
@@ -0,0 +1 @@
|
||||
-e 's/< [0-9.]*/< 0/' -e 's/> [0-9.]*/> 0/'
|
34
t/pt-upgrade/samples/004/select_function.txt
Normal file
34
t/pt-upgrade/samples/004/select_function.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
########################################################################
|
||||
# Query class F05C9711D543F5BF
|
||||
########################################################################
|
||||
|
||||
Reporting class because it has diffs, but hasn't been reported yet.
|
||||
|
||||
Total queries 1
|
||||
Unique queries 1
|
||||
Discarded queries 0
|
||||
|
||||
select (unix_timestamp(now()) ? unix_timestamp(?)) / ?, sleep(?)
|
||||
|
||||
##
|
||||
## Row diffs: 1
|
||||
##
|
||||
|
||||
-- 1.
|
||||
|
||||
@ row 1
|
||||
< 0,0
|
||||
> 0,0
|
||||
|
||||
SELECT (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP('2012-09-16 10:16:36')) / 60, SLEEP(1)
|
||||
|
||||
########################################################################
|
||||
# Stats
|
||||
########################################################################
|
||||
|
||||
failed_queries 0
|
||||
queries_filtered 0
|
||||
queries_no_diffs 0
|
||||
queries_read 1
|
||||
queries_with_diffs 1
|
||||
queries_with_errors 0
|
@@ -1,2 +0,0 @@
|
||||
DROP DATABASE IF EXISTS test;
|
||||
CREATE DATABASE test;
|
Reference in New Issue
Block a user