Hi!
More comments...
On Aug 17, Sergei Golubchik wrote:
> On Aug 17, Benjamin Pflugmann wrote:
>
> But, all you have do here is to add a call to myrg_write().
> Then you will need to write myrg_write(), of course :-)
> But it's very easy - just call my_write for an appropriate table.
s/my_write/mi_write/
> > If this is going a contribution, I thik a mechanism for choosing the
> > insertion type will be needed, and therefore changes to the CREATE
> > TABLE and ALTER TABLE syntax. I would suggest something like a table
> > option
> >
> > INSERT_METHOD = { NONE | FIRST | LAST | ROUND_ROBIN }
> >
> > which would result in
> >
> > CREATE TABLE foo (...) TYPE=MERGE UNION=(a,b) INSERT_METHOD=LAST
> >
> > I did not have a close enough look at the parser to know where/how to
> > add this (because I don't know yet whether I will at all), but I
> > assume it would not be hard to derivate this from other table option
> > rules.
>
> Yes, sure - look for UNION=(), for example.
Hmm, I see some problems here.
Such an information (INSERT_METHOD) should go to .frm file (at least,
for SHOW CREATE TABLE, ALTER TABLE, etc. to work) but there's no place
for it. *.frm files (originating in 1980's) are our main obstacle
in implementing new features. Luckily, 4.0 will have plain-text .frm's
(that is CREATE TABLE statement in plain text - infinitely expandable).
Also, INSERT_METHOD should also go to MRG file, for isam layer to know it.
Also in ROUND_ROBIN it has somehow to preserve the last-target-table number
on shutdown. This will change MRG files from simple ``ls *.MYI > table.MRG''
to something more complex. In ROUND_ROBIN they also won't be read-only.
Otherwise, there can be introduced second file, say, table.MRO (merge-options),
for such a information.
Regards,
Sergei
--
MySQL Development Team
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/
/_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany
<___/