pt-online-schema-change error copying rows: Undefined subroutine &pt_online_schema_change::get

Bug #1188264 reported by Baldur Gudbjornsson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
High
Daniel Nichter

Bug Description

pt-online-schema-change --alter "MODIFY <some column> VARCHAR(512) NOT NULL" --execute D=<data base>,t=<table>,u=<user>,p=<password>
percona-toolkit 2.2.2
Server version: 5.5.31-30.3-log Percona Server (GPL), Release 30.3

Undefined subroutine &pt_online_schema_change::get called at /usr/bin/pt-online-schema-change line 10238.

Column changed from text to -> VARCHAR(512)

Operation, tries, wait:
  copy_rows, 10, 0.25
  create_triggers, 10, 1
  drop_triggers, 10, 1
  swap_tables, 10, 1
  update_foreign_keys, 10, 1
Altering `database_name`.`table_name`...
Creating new table...
Created new table database_name.table_name_new OK.
Altering new table...
Altered `database_name`.`_table_name_new` OK.
Creating triggers...
Created triggers OK.
Copying approximately 2538984 rows...
Dropping triggers...
Dropped triggers OK.
Dropping new table...
Dropped new table OK.
`database_name`.`table_name` was not altered.
 (in cleanup) Error copying rows from `database_name`.`table_name` to `database_name`.`_table_name_new`: Undefined subroutine &pt_online_schema_change::get called at /usr/bin/pt-online-schema-change line 10238.

I ultimately resolved this by stopping slave executing command again waited till I got slave_lag message then when I restarted slave it continued successfully ... have tried since unable to reproduce. But there is at least an error in the logic for that handles the error.

PTDEBUG output attached

Related branches

Revision history for this message
Baldur Gudbjornsson (baldur-gudbjornsson) wrote :
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Thanks, we'll look into it.

Changed in percona-toolkit:
status: New → Triaged
tags: added: crash pt-online-schema-change
Changed in percona-toolkit:
milestone: none → 2.2.4
Changed in percona-toolkit:
importance: Undecided → Medium
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Here's the problem:

                  if ( get('statistics') ) {

A bad typo; that should be $o->get(...).

Changed in percona-toolkit:
status: Triaged → In Progress
assignee: nobody → Daniel Nichter (daniel-nichter)
summary: - Error when executing a pt-online-schema-change to changing a column on a
- master with one slave
+ pt-online-schema-change crashes on copy rows warning with error
+ "Undefined subroutine &pt_online_schema_change::get"
summary: - pt-online-schema-change crashes on copy rows warning with error
- "Undefined subroutine &pt_online_schema_change::get"
+ pt-online-schema-change error copying rows: Undefined subroutine
+ &pt_online_schema_change::get
Changed in percona-toolkit:
importance: Medium → High
Changed in percona-toolkit:
status: In Progress → Fix Committed
Changed in percona-toolkit:
status: Fix Committed → Fix Released
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-359

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.