MySQL Forums
Forum List  »  Replication

Re: Replication Slave update question
Posted by: Aftab Khan
Date: August 31, 2012 04:43AM

>4. Slave mysql session query shows no change to the test record.
Did you have opened transaction? for instance:

On slave host you start new session 'A':

mysql> START TRANSACTION;
mysql> select * from tblInnoDBCheck;
+-----------+
| a         |
+-----------+
| hello     |
| bye       |
| bye again |
+-----------+
3 rows in set (0.00 sec)

On master database, insert new record in tblInnodbCheck table

mysql> insert into tblInnoDBCheck values ('GO');
Query OK, 1 row affected (0.00 sec)

go back to session 'A' and run 'select' query again:

mysql> select * from tblInnoDBCheck;
+-----------+
| a         |
+-----------+
| hello     |
| bye       |
| bye again |
+-----------+
3 rows in set (0.00 sec)

You would see the same three rows. However, if you close the current transaction i.e. commit and rerun select then you would see the new row. Alternatively if you kill current session and go back in, you would see the new record.

See:

http://dev.mysql.com/doc/refman/5.0/en/set-transaction.html#isolevel_repeatable-read



Edited 2 time(s). Last edit at 08/31/2012 04:44AM by Aftab Khan.

Options: ReplyQuote


Subject
Views
Written By
Posted
2803
August 30, 2012 12:56PM
Re: Replication Slave update question
1084
August 31, 2012 04:43AM
1115
August 31, 2012 10:20AM
1158
August 31, 2012 06:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.