# pt-online-schema-change 2.2.8 segfaults on column type change

**URL:** <https://forums.percona.com/t/pt-online-schema-change-2-2-8-segfaults-on-column-type-change/3532>\
**Category:** Percona Toolkit\
**Created:** [June 6, 2014, 1:02pm UTC](https://forums.percona.com/t/pt-online-schema-change-2-2-8-segfaults-on-column-type-change/3532 "2014-06-06T13:02:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joepmeloen12](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@joepmeloen12](https://forums.percona.com/u/joepmeloen12)\
**Post date:** [June 6, 2014, 1:02pm UTC](https://forums.percona.com/t/pt-online-schema-change-2-2-8-segfaults-on-column-type-change/3532/1 "2014-06-06T13:02:41Z")

</div>

pt-online-schema-change 2.2.8 segfaults when changing a column type. This works, provided the field is already a VARCHAR:  
–alter=“CHANGE EFID90 EFID90 VARCHAR(18)”

though when altering to a different type:

–alter=“CHANGE EFID90 EFID90 INT(11)”

The result is:  
No slaves found. See --recursion-method if host node1.hostname has slaves.  
Not checking slave lag because no slaves were found and --check-slave-lag was not specified.  
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 `databasename`.`tablename`…  
Creating new table…  
Created new table databasename.tablename\_new OK.  
Altering new table…  
Altered `databasename`.`_tablename_new` OK.  
2014-06-06T20:03:42 Creating triggers…  
2014-06-06T20:03:42 Created triggers OK.  
2014-06-06T20:03:42 Copying approximately 3 rows…  
2014-06-06T20:03:42 Dropping triggers…  
2014-06-06T20:03:42 Dropped triggers OK.  
2014-06-06T20:03:42 Dropping new table…  
2014-06-06T20:03:42 Dropped new table OK.  
`databasename`.`tablename` was not altered.  
Segmentation fault (core dumped)

Any clues?

---

<div class="post-metadata">

**Author:** ![joepmeloen12](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@joepmeloen12](https://forums.percona.com/u/joepmeloen12)\
**Post date:** [June 11, 2014, 4:39am UTC](https://forums.percona.com/t/pt-online-schema-change-2-2-8-segfaults-on-column-type-change/3532/2 "2014-06-11T04:39:32Z")

</div>

Bump, any clue? Anyone? This is pretty nasty for us because now we can only issue ALTER TABLE statements on the MySQL monitor which takes ages locking the ENTIRE cluster.

---

<div class="post-metadata">

**Author:** ![psong](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/psong/32/16894_2.png) [@psong](https://forums.percona.com/u/psong)\
**Post date:** [June 13, 2014, 7:17am UTC](https://forums.percona.com/t/pt-online-schema-change-2-2-8-segfaults-on-column-type-change/3532/3 "2014-06-13T07:17:52Z")

</div>

Hi There,

I didn’t reproduce a segmentation fault with pt-osc 2.2.8. What version of MySQL are you using?

In my testing, when the data in the varchar column could be safely converted, the tool finishes fine:

```auto

...
Successfully altered `test`.`t2`.

```

When the data couldn’t be converted, that tool would fail with the corresponding error message:

```auto

...
2014-06-13T20:31:26 Error copying rows from `test`.`t2` to `test`.`_t2_new`: 2014-06-13T20:31:26 Copying rows caused a MySQL error 1264: Level: Warning
Code: 1264
Message: Out of range value for column 'name' at row 3

Or
...
2014-06-13T20:30:45 Error copying rows from `test`.`t2` to `test`.`_t2_new`: 2014-06-13T20:30:45 Copying rows caused a MySQL error 1366:
Level: Warning
Code: 1366
Message: Incorrect integer value: 'mimi maya' for column 'name' at row 3

```

Was the error message you posted from running on a table with 3 rows? Could you send the full command and the content of the table?
