I am using pt-online-schema-change 3.6.0 and I ran it like this:
pt-online-schema-change
–user=root
–password=x
–alter “MODIFY COLUMN c decimal(12,2) signed NOT NULL”
–alter-foreign-keys-method=drop_swap
–max-load Threads_running=400
–critical-load Threads_running=1000
–nocheck-foreign-keys
–recursion-method=none
–pause-file=/tmp/percona_pause
–progress=time,10
–set-vars lock_wait_timeout=2
–statistics
D=x,t=y,h=z
–execute
When I ran this in production, the tool finished but I saw this in the statistics:
Event Count
================== =====
INSERT 2830
mysql_warning_1062 6492
The 1062 seems to be duplicate entries. This seems to be triggered at this part of the code:
if ( !$stats->{"mysql_warning_$code"}++ ) { # warn once warn "Copying rows caused a MySQL error $code: " . ($warn_code{$code}->{message} ? $warn_code{$code}->{message} : $message) . "\nNo more warnings about this MySQL error will be " . "reported. If --statistics was specified, " . "mysql_warning_$code will list the total count of " . "this MySQL error.\n";
Should I now be concerned that the altered/new table has data integrity issues since the pt-osc reported duplicate errors? Note that when I ran this on a backup instance, I did not see this at all.