>>>>> "Sergei" == Sergei Golubchik <serg@stripped> writes:
Sergei> On Aug 18, Michael Widenius wrote:
Sergei> Also, INSERT_METHOD should also go to MRG file, for isam layer to know it.
>> It's should be enough for MySQL to know about this.
Sergei> It CAN be done that way - that is to pass INSERT_METHOD as an argument
Sergei> to mrg_write().
Sergei> But to be consistent it should be stored on isam layer - it's isam
Sergei> and MySQL shouldn't ever worry about it.
It's actually MYISAM-MERGE information and not MyISAM.
If we define the INSERT to be a dynamic property that is always to be
sent to mrg_write(), then it's a MySQL problem.
Sergei> Also in ROUND_ROBIN it has somehow to preserve the last-target-table number
Sergei> on shutdown. This will change MRG files from simple ``ls *.MYI >
Sergei> to something more complex. In ROUND_ROBIN they also won't be read-only.
>> Sorry, but I didn't get that.
Sergei> Well, suppose you have three tables in MERGE, and INSERT_METHOD=ROUND_ROBIN
Sergei> First insert goes to the first table, the second one - to the second.
Sergei> Now one does ``mysql.server stop; mysql.server start'' - or simply mysqld
Sergei> dies and safe_mysqld restarts it. I would prefer the first insert after
Sergei> to go to the third table.
I don't think that Benjamin is planing a round_robin.
I actually don't think this would be very useful extension anyway.
(One can't even do this to speed up inserts as the table locks on
the MERGE file would interfere with this).
If one needs things like this, then it's better to use a hardware