pt-heartbeat update uses strings instead of ints
Bug #1236175 reported by
monty solomon
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Character strings are used as the values for int fields in the UPDATE statement in addition to the value in the WHERE clause.
UPDATE `heartbeat`
CREATE TABLE `heartbeat` (
`ts` varchar(26) NOT NULL,
`server_id` int(10) unsigned NOT NULL,
`file` varchar(255) DEFAULT NULL,
`position` bigint(20) unsigned DEFAULT NULL,
`relay_
`exec_
PRIMARY KEY (`server_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
tags: | added: pt-heartbeat |
Changed in percona-toolkit: | |
status: | New → Confirmed |
To post a comment you must log in.
The pt-heartbeat UPDATE appears in the slow query log
# Query 13: 0.00 QPS, 0.00x concurrency, ID 0xC2C26DA3FC5D8DB3 at byte 68615454 ####### ####### ####### ####### ####### ####### ####### ####### # .`heartbeat` \G .`heartbeat` SET ts='2013- 10-05T16: 51:48.001010' , file='bin.000027', position= '520884073' , relay_master_ log_file= NULL, exec_master_ log_pos= NULL WHERE server_ id='3095733595' \G 10-05T16: 51:48.001010' , file='bin.000027', position= '520884073' , relay_master_ log_file= NULL, exec_master_ log_pos= NULL from `heartbeat` .`heartbeat` where server_ id='3095733595' \G
# This item is included in the report because it matches --outliers.
# Scores: V/M = 0.08
# Time range: 2013-10-02 07:34:59 to 2013-10-07 04:54:27
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 73
# Exec time 0 167s 2s 4s 2s 3s 416ms 2s
# Lock time 0 6ms 66us 143us 83us 108us 17us 73us
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 73 1 1 1 1 0 1
# Rows affecte 0 73 1 1 1 1 0 1
# Rows read 0 73 1 1 1 1 0 1
# Bytes sent 0 3.71k 52 52 52 52 0 52
# Merge passes 0 0 0 0 0 0 0 0
# Tmp tables 0 0 0 0 0 0 0 0
# Tmp disk tbl 0 0 0 0 0 0 0 0
# Tmp tbl size 0 0 0 0 0 0 0 0
# Query size 0 13.54k 188 191 189.99 183.58 0 183.58
# InnoDB:
# IO r bytes 0 0 0 0 0 0 0 0
# IO r ops 0 0 0 0 0 0 0 0
# IO r wait 0 0 0 0 0 0 0 0
# pages distin 0 403 2 108 5.52 11.95 13.77 1.96
# queue wait 0 0 0 0 0 0 0 0
# rec lock wai 0 0 0 0 0 0 0 0
# String:
# Databases heartbeat
# Hosts localhost
# InnoDB trxID ADAB0869 (1/1%), AE2CEFBD (1/1%)... 71 more
# Last errno 0
# Users
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s #######
# 10s+
# Tables
# SHOW TABLE STATUS FROM `heartbeat` LIKE 'heartbeat'\G
# SHOW CREATE TABLE `heartbeat`
UPDATE `heartbeat`
# Converted for EXPLAIN
# EXPLAIN /*!50100 PARTITIONS*/
select ts='2013-