Hi Ananda,
I think you are confused about locks and the binlog both.
Locks lock tables. This disallows changes. READ locks prevent changes, but do
not block anyone from READING from the tables, and if I recall correctly, also
allow other people to get READ locks at the same time. WRITE locks block any
access to the tables by other connections. You can test this yourself very
easily. But regardless, you cannot change a table that is locked.
As for the binlog, it records changes that have happened to the database. If I
understand you correctly, you may be thinking of it as a "buffer of changes not
yet applied, which will be applied when the lock is released." That is not how
it works. If you have a FLUSH TABLES WITH READ LOCK open, all tables are
flushed to disk and locked, and there will be *no changes* because everything is
locked. Therefore nothing other connections try to do will be written to the
binlog while you have the locks open (unless you make those changes yourself,
which I have never tried to do).
Cheers
Baron
Ananda Kumar wrote:
Hi Baron,
Its only a read lock, so changes on these table should be allowed, that is
what the documentaion say. And the changes will be in bin-log till the READ
lock is held.
regards
anandkl
On 5/30/07, Baron Schwartz <[EMAIL PROTECTED]> wrote:
Hi,
Ananda Kumar wrote:
> Hi All,
> This question just for information sake.
> If i do
>
> flush table lock read;
I think you mean FLUSH TABLES WITH READ LOCK?
> Any changes happening on tables during this period, will it be viewable
by
> another user or will the user have to wait till the lock is released to
see
> the new changes
> And once the lock is released, does mysql apply all the changes from
> bin-log
> to the respective tables.
The tables are locked. There will be no changes while they are locked.
I don't think I really understand your question.
Baron
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]