List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:August 17 2001 1:31pm
Subject:Re: adding INSERT support to MERGE tables
View as plain text  
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
       <___/
Thread
adding INSERT support to MERGE tablesBenjamin Pflugmann17 Aug
  • Re: adding INSERT support to MERGE tablesSergei Golubchik17 Aug
    • Re: adding INSERT support to MERGE tablesMichael Widenius17 Aug
      • Re: adding INSERT support to MERGE tablesBenjamin Pflugmann30 Aug
        • Re: adding INSERT support to MERGE tablesSergei Golubchik30 Aug
          • Re: adding INSERT support to MERGE tablesBenjamin Pflugmann30 Aug
        • Re: adding INSERT support to MERGE tablesMichael Widenius30 Aug
          • Re: adding INSERT support to MERGE tablesBenjamin Pflugmann30 Aug
            • Re: adding INSERT support to MERGE tablesMichael Widenius1 Sep
              • Re: adding INSERT support to MERGE tablesBenjamin Pflugmann5 Sep
                • Re: adding INSERT support to MERGE tablesMichael Widenius6 Sep
                  • Re: adding INSERT support to MERGE tablesBenjamin Pflugmann10 Sep
                    • Re: adding INSERT support to MERGE tablesBenjamin Pflugmann11 Sep
                      • Re: adding INSERT support to MERGE tablesMichael Widenius12 Sep
                        • Re: adding INSERT support to MERGE tablesBenjamin Pflugmann12 Sep
                          • Re: adding INSERT support to MERGE tablesMichael Widenius13 Sep
                            • Re: adding INSERT support to MERGE tablesBenjamin Pflugmann18 Sep
                      • Re: adding INSERT support to MERGE tablesMichael Widenius22 Sep
                      • Re: adding INSERT support to MERGE tablesMichael Widenius24 Sep
                        • Re: adding INSERT support to MERGE tablesBenjamin Pflugmann27 Sep
    • Re: adding INSERT support to MERGE tablesSergei Golubchik17 Aug
      • Re: adding INSERT support to MERGE tablesBenjamin Pflugmann17 Aug
      • Re: adding INSERT support to MERGE tablesMichael Widenius18 Aug
        • Re: adding INSERT support to MERGE tablesSergei Golubchik18 Aug
          • Re: adding INSERT support to MERGE tablesMichael Widenius20 Aug
RE: adding INSERT support to MERGE tablesThe Tilghman20 Aug