List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:September 1 2001 9:15am
Subject:Re: adding INSERT support to MERGE tables
View as plain text  
Hi!

>>>>> "Benjamin" == Benjamin Pflugmann <philemon@stripped> writes:

<cut>

Benjamin> Well, I see. I presumed that ha_myisammrg::write_row() shouldn't know
Benjamin> about the MYISAM handler (i.e. the mi_* functions) directly and also
Benjamin> didn't found any use of one in that place. But who am I to question
Benjamin> you? ;)

myisammrg is a merge handler just for MyISAM, so you can assume
that the underlying tables are MyISAM.
 
In the future we may do a another merge handler that can use any
table handler under it, but I don't think we have to concern us with
this today.

Benjamin> May I ask you to explain the scopes of the different sections a bit
Benjamin> more (files in .../myisammrg/ vs. ha_myisammrg.cc). What should go
Benjamin> where?

Benjamin> I understand, that ha_myisammrg is a table handler and should provide
Benjamin> the SQL server with an interface to an table type "library". I presume
Benjamin> that the files in /myisammrg should form an independend library for
Benjamin> handling table files of a certain type, as for what I know, the ISAM
Benjamin> type existed before and was integrated this way.

Benjamin> With that in mind I presumed that the inserting method belongs to the
Benjamin> underlying table library, not the handler.

See above. myisammrg stands for MERGE handler for MYISAM tables.

I suggested the above code just to give you an idea of how to do this
'easily'.

My opinion is that general things should be done in the myisammrg level.

I don't yet know if where-to-write should be specified on the
myisammrg or ha_myisammrg.cc level as this is something that is
special for merge tables.

One good solution would be to do this the following way:

add the function:

myrg_write(MYRG_INFO *file, char *record, enum_ha_write_place where_to_write)

to the myisammrg interface and then MySQL specify in
ha_myisammrg::write_row() the value of 'where_to_write' based on
either the SQL command or from information stored in the .frm file.

In other words, I don't think we have to specify a default where_to_write
file in the myisammrg handler but force the application to do this.
(This will make your job a lot easier)

Benjamin> And now... where is the fallacy?

Sorry ?

Regards,
Monty
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