pt-heartbeat update uses strings instead of ints

Bug #1236175 reported by monty solomon
6
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`.`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

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_master_log_file` varchar(255) DEFAULT NULL,
  `exec_master_log_pos` bigint(20) unsigned DEFAULT NULL,
  PRIMARY KEY (`server_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

Tags: pt-heartbeat
Revision history for this message
monty solomon (monty+launchpad) wrote :

The pt-heartbeat UPDATE appears in the slow query log

# Query 13: 0.00 QPS, 0.00x concurrency, ID 0xC2C26DA3FC5D8DB3 at byte 68615454
# 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`.`heartbeat`\G
UPDATE `heartbeat`.`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
# Converted for EXPLAIN
# EXPLAIN /*!50100 PARTITIONS*/
select ts='2013-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

tags: added: pt-heartbeat
Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
monty solomon (monty+launchpad) wrote :

What are the plans to fix this bug? It is open over two years.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1158

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.