Comment 15 for bug 552420

Revision history for this message
Brian Aker (brianaker) wrote : Re: [Bug 552420] Re: implicit startTransaction in ALTER TABLE calling rnd_init to do data copy

Hi!

I think a hint from the engine is appropriate. I expect more of alter
to be pushed down to the engine in the future.

Cheers,
    --Brian

On Apr 28, 2010, at 6:38 PM, Stewart Smith <email address hidden>
wrote:

> On Wed, 28 Apr 2010 16:41:37 -0000, Jay Pipes <email address hidden>
> wrote:
>> Therefore, the solution to this is to manually call
>> plugin::TransactionalStorageEngine::doStartTransaction() *somewhere*
>> before the copying of the data from the old table into the new table
>> (when Cursor::rnd_init() is eventually callled...)
>
> There has been an "optimisation" in the past for some engines (NDB and
> maybe InnoDB) to help reduce the amount of log potentially have to be
> replayed (or in NDB case the number of operations records used as
> well)
> to COMMIT every so often in an alter table.
>
> This could possibly be a feature of the upper layer... OR (I think the
> better approach) is to maybe have a flag to start transaction saying
> that this transaction can be committed every so often by the engine as
> an optimisation.
>
> thoughts?
>
> --
> Stewart Smith
>
> --
> implicit startTransaction in ALTER TABLE calling rnd_init to do data
> copy
> https://bugs.launchpad.net/bugs/552420
> 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: In Progress
> Status in Drizzle cherry series: In Progress
>
> Bug description:
> in an ALTER TABLE, your engine is (currently) expected to be able to
> start a transaction in rnd_init().
>
> more info coming (as in, "remove these two lines from
> embedded_innodb and you'll see it crash)
>
>