List:Commits« Previous MessageNext Message »
From:Ingo Strüwing Date:August 29 2007 6:14pm
Subject:reopen_tables() [Re: bk commit - 4.1 tree (istruewing:1.2630) BUG#26379]
View as plain text  
Hi Dmitri,

Dmitri Lenev, 20.06.2007 21:57:
...
> 6) reopen_table(), reopen_tables():
> 
>    Remove those usages of reopen_table()/reopen_tables() which are not
>    associated with reopening table under LOCK TABLES (i.e. get rid of
>    its usage within wait_for_tables()). This will simplify changing of
>    reopen_table() in such way that it will safely handle merge tables.

wait_for_tables() is used in mysql_lock_tables() only. It is called when
not all locks could be taken and we need to wait for the tables to be
refreshed before we can try again.

I do not understand what we could replace for reopen_tables(). All
tables are still open and listed in thd->open_tables, including the
MERGE children. Tables that need refresh have closed their handlers.
They need a low-level re-open only. A possible alternative, I could
think of would be to leave mysql_lock_tables with an error code after
waiting for refresh, and start a new cycle in open_and_lock_tables().
But this can only be done when mysql_lock_tables() had been called from
there. It is not an option in other cases. So what do you suggest to
replace for reopen_tables()?

Another thing is that I don't see yet, why it would help us. I don't see
a problem in making reopen_tables() MERGE safe (yet).

Can you please help, before I try the impossible? ;-)

...

Possible problem: in reopen_tables() we report an error for each failed
reopen_table(), but we do still take locks on the successfully opened
tables. Is this required/desirable? Don't we need to abort after
reopen_tables() anyway?

Regards
Ingo
-- 
Ingo Strüwing, Senior Software Developer
MySQL GmbH, Dachauer Str. 37, D-80335 München
Geschäftsführer: Kaj Arnö - HRB München 162140
Thread
Re: bk commit - 4.1 tree (istruewing:1.2630) BUG#26379Dmitri Lenev20 Jun
  • Re: bk commit - 4.1 tree (istruewing:1.2630) BUG#26379Ingo Strüwing21 Jun
  • Re: bk commit - 4.1 tree (istruewing:1.2630) BUG#26379Ingo Strüwing13 Jul
  • reopen_tables() [Re: bk commit - 4.1 tree (istruewing:1.2630) BUG#26379]Ingo Strüwing29 Aug
    • Re: reopen_tables() [Re: bk commit - 4.1 tree (istruewing:1.2630) BUG#26379]Dmitri Lenev7 Sep
      • Re: reopen_tables() [Re: bk commit - 4.1 tree (istruewing:1.2630)BUG#26379]Ingo Strüwing7 Sep
        • Re: reopen_tables() [Re: bk commit - 4.1 tree (istruewing:1.2630) BUG#26379]Dmitri Lenev11 Sep
Re: bk commit - 4.1 tree (istruewing:1.2630) BUG#26379Dmitri Lenev25 Jul
  • Re: bk commit - 4.1 tree (istruewing:1.2630) BUG#26379Ingo Strüwing26 Jul