Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
pt-online-schema-change UUID-based constraint name patch
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Morgan Pyne  
View profile  
 More options Oct 10 2012, 3:23 am
From: Morgan Pyne <mor...@vendhq.com>
Date: Wed, 10 Oct 2012 00:23:16 -0700 (PDT)
Local: Wed, Oct 10 2012 3:23 am
Subject: pt-online-schema-change UUID-based constraint name patch

Hi,

I recently hit an issue when modifying a schema
using pt-online-schema-change. I was unable to modify the schema because
some of my constraint names were already very long and the mechanism
that pt-online-schema-change uses to keep the constraint names unique
(prepending an underscore) pushed them over the 64 char limit and thus the
initial (new) table creation failed. Looking at the source, I could see a
TODO to change the constraint naming mechanism to use something such as
UUIDs to avoid potential collisions. Since this approach would also solve
my problem, I implemented a patch to do it.

I modified  pt-online-schema-change to take a '--uuid-constraints' cli
option (default 'false') which if present would use a UUID-derived FK name
for the constraints on the new table instead of simply prefixing the old
constraint names with underscores. If there is any interest I'm happy to
provide the code.

Regards,
Morgan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Karwin  
View profile  
 More options Oct 10 2012, 12:09 pm
From: Bill Karwin <bill.kar...@percona.com>
Date: Wed, 10 Oct 2012 09:09:00 -0700
Subject: Re: [percona-group] pt-online-schema-change UUID-based constraint name patch

Thanks for implementing the patch, Morgan!

FWIW, the most reliable way to bring this to the attention of the PT developers is to log it as a feature request at https://bugs.launchpad.net/percona-toolkit and attach your patch.  You'll have to register an account for yourself at Launchpad, but that's free and easy, and has other uses too.

Regards,
Bill Karwin

On Oct 10, 2012, at 12:23 AM, Morgan Pyne wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Morgan Pyne  
View profile  
 More options Oct 11 2012, 8:17 pm
From: Morgan Pyne <mor...@vendhq.com>
Date: Fri, 12 Oct 2012 13:17:12 +1300
Local: Thurs, Oct 11 2012 8:17 pm
Subject: Re: [percona-group] pt-online-schema-change UUID-based constraint name patch

Hi Bill,

Is there a public repository for the Percona Toolkit?

My patch was against the shipped Perl utility, but it looks like this has been assembled using some kind of build process (to inline dependent modules etc). I guess a patch against the (built) utility isn't much use if that is the case; it would be better to patch against the actual sources.

Thanks,
Morgan

On 11/10/2012, at 5:09 AM, Bill Karwin <bill.kar...@percona.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Morgan Pyne  
View profile  
 More options Oct 11 2012, 8:24 pm
From: Morgan Pyne <mor...@vendhq.com>
Date: Fri, 12 Oct 2012 13:24:08 +1300
Local: Thurs, Oct 11 2012 8:24 pm
Subject: Re: [percona-group] pt-online-schema-change UUID-based constraint name patch

Ah, disregard my last email; after creating the a/c on launchpad I can see the bzr repo and information to get the src. Patch forthcoming once I figure it out and learn how to use bazaar :-)
M

On 12/10/2012, at 1:17 PM, Morgan Pyne <mor...@vendhq.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Karwin  
View profile  
 More options Oct 12 2012, 12:25 pm
From: Bill Karwin <bill.kar...@percona.com>
Date: Fri, 12 Oct 2012 09:25:05 -0700
Local: Fri, Oct 12 2012 12:25 pm
Subject: Re: [percona-group] pt-online-schema-change UUID-based constraint name patch

We should probably let one of the PT developers advise you on the best way to design a patch.

Honestly, I'm not sure what is the process for building the PT tools from the individual class files in the lib directory.  It appears like the lib class files are appended together to form the PT tools, probably to make the tools more standalone and eliminate complications from @INC and so on.

But I know I've seen at least one occasion where the code under lib didn't match the code assembled into one of the tools under bin (in the same release of PT).  As if the code in lib were newer, and slightly refactored relative to the code in the stable tool.

Regards,
Bill Karwin

On Oct 11, 2012, at 5:17 PM, Morgan Pyne wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »