|
|||||||||||
|
Re: bk commit - 4.1 tree (istruewing:1.2630) BUG#26379
From: Ingo Strüwing <ingo(at)mysql.com>
Date: Thu Jul 26 2007 - 08:35:42 EDT
thank you very much for the answers. Please see below for comments.
Dmitri Lenev wrote:
>>> * ingo@mysql.com ... > My initial idea was that this call can be used to break the association > between a merge table and its underlying tables when we release the merge > table into the table cache. Although, perhaps, we don't need this call as > long as we call extra(HA_EXTRA_FINALIZE_MERGE_OPEN) each time we get a > merge table from the table cache, I still think that it can be useful > for debugging purposes. For example, in this call we can mark the > handler for merged table as "unusable" until the next call to > extra(HA_EXTRA_FINALIZE_MERGE_OPEN)). Ok. I didn't get that idea before. So when a MERGE table is released to the table cache, the children are detached. This means that the storage engine instance of the MERGE table must be closed. This would release the references to the MyISAM table instances. Consequently we end up with a MERGE handler object without an open storage engine table. This must of course not be used for table access. When the MERGE table is re-used, new MyISAM table instances need to be referenced. By chance this could be the same as before, but often it would not. This answers all my questions.
...
In this case I would close the storage engine instance and set "MYRG_INFO" to NULL. > Since I think that we should Ok. But if we take that hypothetical chance into account, we should check with "if", not with "DBUG_ASSERT". According to Murphy, the real weird things happen in production systems, not in developer environments. Our test suite proves every day that we cannot foresee every possible situation. ... >> As you can see from my patch I understood the above so that I should add >> the children to the table list (next_global) when a merge table is >> opened, and remove them after the last child has been opened. > > OK. But in this case please check that everything works correctly in > the situation when we fail to open one of the child tables (i.e. that > we remove the child tables from the list in this situation as well). Either I misunderstand your sentence dramatically, or I am becoming really scared. Does this mean that a failure to open a table takes that table from the list and proceeds with the next one? Don't we just abort the list and close what we have opened thus far?
...
Yes. But I thought you missed the "refresh" problem. Since I do now know that you want to disassociate children from parent at close, my concerns are obsolete. ... Then I'll continue with implementing close of MERGE tables. If you have comments regarding my coding of the "open" part, please send them.
Regards
-- Ingo Strüwing, Senior Software Developer MySQL GmbH, Radlkoferstr. 2, D-81373 München Geschäftsführer: Kaj Arnö - HRB München 162140 -- MySQL Code Commits Mailing List For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=lists@pantek.comReceived on Thu Jul 26 10:22:39 2007 This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:15:00 EDT |
||||||||||
|
|||||||||||