| ▲ | evanelias a day ago | |||||||
I agree the root cause here is the lack of a primary key to begin with. But as far as I know, DDL is always replicated as just a statement, regardless of session binlog_format. So I believe the only real fix here is the general approach suggested in the manual [1], i.e. create a new empty table that has the auto_increment PK added and then populate it from the old table. [1] https://dev.mysql.com/doc/refman/9.7/en/replication-features... | ||||||||
| ▲ | fipar 15 hours ago | parent [-] | |||||||
Yeah, looking back at my first reply I did get the order wrong: first the alter, then the empty noop. But once you run the alter and have a primary key (though the author clarified the table did have a PK already), I’d just use pt-osc to run the empty noop as that would basically do what the manual says. Nice seeing you Evan! :) | ||||||||
| ||||||||