Comment 4 for bug 1498128

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

This bug was introduced in 2.2.15 by https://bugs.launchpad.net/percona-toolkit/+bug/1215587. In addition to using the patched version attached in the previous comment, one can also use v2.2.14.

Given those two alternatives, I want to leave this for a future release because I think neither solution is ideal: adding _ leads to max length problems, but the toggling approach introduced in 2.2.15 lead to this problem and, in general, strikes me as not a good thing to do because it doesn't guarantee uniqueness and it's a bit clobbering, e.g. if a constraint's name is originally "_foo", then we clobber that by making it "foo" whereas adding a _ leaves the original name intact. I think a better solution might be something like a magical suffix like "_vN" where N is an integer that pt-osc increments each time it changes the constraint. So even if the original name is "_foo_v2", we'll get "_foo_v2_v1" on first run, "_foo_v2_v2" on 2nd run, etc. This has a bit of a length problem as well, but it's far more bounded than simply adding _, and the tool should do the right thing: verify that it can successfully rename all constraints before doing any real work. -- All this is just ideas so far.