List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:April 25 2008 4:00pm
Subject:re: Flush Tables with Read Locks
View as plain text  
Hi!

>>>>> "Jim" == Jim Starkey <jstarkey@stripped> writes:

Jim> Could somebody give me a clue how this gets communicated to a storage
Jim> engine?

For the storage engine, there is nothing to do, except possible sync
all table date to disk when all handlers to a table is closed.

All the logic and protection is done on the upper level.
Here is how "Flush Tables with Read Locks" works:

- Put a protection in place that stops anyone from open a table.
- Close all open table handlers that can be closed. Mark all that are
  in use to be closed at statement end.
- Wait until all table handlers have been closed.
- Set a global write protection flag that will cause any statement
  that modifies tables to wait.
- Allow read only queries to continue.

Regards,
Monty
Thread
Flush Tables with Read LocksJim Starkey25 Apr
  • Re: Flush Tables with Read LocksJay Pipes25 Apr
    • Re: Flush Tables with Read LocksJim Starkey25 Apr
  • re: Flush Tables with Read LocksMichael Widenius25 Apr
    • Re: Flush Tables with Read LocksJim Starkey25 Apr
      • Re: Flush Tables with Read LocksMark Callaghan25 Apr
        • Re: Flush Tables with Read LocksEric Bergen25 Apr
          • Re: Flush Tables with Read LocksJim Starkey25 Apr
Re: Flush Tables with Read LocksMark Callaghan25 Apr
  • Re: Flush Tables with Read LocksJim Starkey25 Apr
    • Re: Flush Tables with Read LocksEric Bergen25 Apr
      • Re: Flush Tables with Read LocksJim Starkey25 Apr
    • RE: Flush Tables with Read LocksRick James29 Apr
      • Re: Flush Tables with Read LocksAnn W. Harrison29 Apr