mysql_alter_db() still pushes a raw SQL statement into the replication stream

Bug #614061 reported by Brian Aker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
David Shrewsbury
7.0
Fix Released
Medium
David Shrewsbury

Bug Description

Since mysql_alter_db() pushes raw SQL into the replication stream the end result is something that is not portable. We should either send in a set of change vectors, or just hand over the table and let the client side do a diff.

Related branches

Revision history for this message
Stewart Smith (stewart) wrote : Re: [Bug 614061] [NEW] mysql_alter_db() still pushes a raw SQL statement into the replication stream

On Thu, 05 Aug 2010 21:55:04 -0000, Brian Aker <email address hidden> wrote:
> Since mysql_alter_db() pushes raw SQL into the replication stream the
> end result is something that is not portable. We should either send in a
> set of change vectors, or just hand over the table and let the client
> side do a diff.

You can't reliably do a diff for all the ALTER TABLE operations we
support.

e.g. you can drop a column and add a column with the same name.

--
Stewart Smith

Revision history for this message
Brian Aker (brianaker) wrote :

Hi!

This is for alter schema, not table.

Cheers,
 -Brian

re: table, we need version numbers on these things, probably globally unique.

On Aug 5, 2010, at 3:58 PM, Stewart Smith wrote:

> On Thu, 05 Aug 2010 21:55:04 -0000, Brian Aker <email address hidden> wrote:
>> Since mysql_alter_db() pushes raw SQL into the replication stream the
>> end result is something that is not portable. We should either send in a
>> set of change vectors, or just hand over the table and let the client
>> side do a diff.
>
> You can't reliably do a diff for all the ALTER TABLE operations we
> support.
>
> e.g. you can drop a column and add a column with the same name.
>
> --
> Stewart Smith
>
> --
> mysql_alter_db() still pushes a raw SQL statement into the replication stream
> https://bugs.launchpad.net/bugs/614061
> You received this bug notification because you are a member of Drizzle-
> developers, which is subscribed to Drizzle.
>
> Status in A Lightweight SQL Database for Cloud and Web: New
>
> Bug description:
> Since mysql_alter_db() pushes raw SQL into the replication stream the end result is something that is not portable. We should either send in a set of change vectors, or just hand over the table and let the client side do a diff.
>
>

Revision history for this message
Stewart Smith (stewart) wrote :

On Thu, 05 Aug 2010 23:08:17 -0000, Brian Aker <email address hidden> wrote:
> This is for alter schema, not table.

wow, I am blind.

In which case this should be brain dead simple....

Is there anything at all we could possibly add that would require list
of changes rather than diffing the structures? (not that i really trust
any code to get that right... the list of changes leads to
reconstructing ALTER commands a bit more error proof)

> re: table, we need version numbers on these things, probably globally
> unique.

to ensure we're altering the same object?

--
Stewart Smith

Stewart Smith (stewart)
Changed in drizzle:
assignee: nobody → Joe Daly (skinny.moey)
importance: Undecided → Medium
status: New → Confirmed
Changed in drizzle:
assignee: Joe Daly (skinny.moey) → David Shrewsbury (dshrews)
Changed in drizzle:
status: Confirmed → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.