Hi!
>>>>> "Denis" == Denis Pithon <denis.pithon@stripped> writes:
Denis> Hi all,
Denis> Last week, I told you that a "check table" writing occured out of a
Denis> locked section. I tried to repeat this problem with one standard MySQL
Denis> server... without success. I have many doubts now (is it really "check"?)
Denis> and I try to elucidate this problem.
Denis> Since I have started to use MySQL as a parallel server, I
Denis> often have this kind of message with "check table":
Denis> "2 clients is using or hasn't closed the table properly."
Denis> I have a theory about it, perhaps I'm wrong: MySQL _never_ closes the used
Denis> tables, until the server is shutdown or maximum number of opened files is
Denis> reached. I guess that a chunk of bytes is written to files before closing
Denis> the table (previous cases). Without this final writing, all servers see
Denis> MYI or MYD files marked as used.
That is right.
The first time a table is updated, the table is marked as 'used' by
incrementing a counter in the file. When the table is closed the
counter is decremented.
Denis> If I'm true, I need to synchonize _all_ informations to files. I don't
Denis> wan't servers to hide informations each others...
As the 'changed' number is updated relatively on close/update, I don't
really see a big problem with this. The 'table is in use' warning is
just something one should ignore on multi-mysqld system.
Anyway, if all servers close the file properly, then the number should
be 0 when it's not in use by any server. If this isn't the case, you
should try to find out what is going wrong!
Regards,
Monty