Hi,

I am new to replication so excuse me if my question is stupid.

The manual recommends that a nice scenario to take advantage of replication in MySQL is to send all updating queries to the master server, and reading from the slave. I would like to use this setup (as usual, I have many more selects than inserts/updates) but I am a little concerned what happens if the slave is behind the master in updating its DB.

Say I do like this:
1. update something set `a`=1 where c=d (using the master server)
2. update something set `a`=2 where c=d (using the master server)
and then immediately
3. select `a` from something where c=d (using the slave)

What if #3 fetches the value of `a` from the slave before `a`=2 takes place? Is it possible that I get `a`==1? Or does replication take care of that?

Other than that: does anybody here have a Nagios script that checks if replication is running O.K.? :-)

Thanks,
- Csongor

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to