MySQL Bin Log Position C API

2009-11-13 Thread Dave Juntgen
Hello everyone, Is there a way to get the last bin pos of a write using the C API? I'm wanting to use this for MASTER / SLAVE load balancing check. For example: M = Master S = Slave W = Write Q = Query W->M (get write bin pos). Now right after insert go query that rec and try using S server

Re: bin-log position.

2007-07-08 Thread Ananda Kumar
Hi Alex, we have another replication setup, i just checked that "Read_Master_Log_Pos" and "exec_master_log_pos" has the same value. regards anandkl On 7/9/07, Alex Arul Lurthu <[EMAIL PROTECTED]> wrote: You will be taking a chance if you use Read_Master_Log_Pos: 106683511. It is not guarantee

Re: bin-log position.

2007-07-08 Thread Alex Arul Lurthu
You will be taking a chance if you use Read_Master_Log_Pos: 106683511. It is not guaranteed that whatever is read from master is definitely applied. The apply of the read sqls might have stopped somewhere and in that case Read_Master_Log_Pos and exec_master_log_pos might be different. -- Than

Re: bin-log position.

2007-07-08 Thread Ananda Kumar
Hi Alex, Thanks a lot, I missed on taking the "exe_master_log position" value. If i start from Read_Master_Log_Pos: 106683511, will it cause any harm. regards anandkl On 7/9/07, Alex Arul Lurthu <[EMAIL PROTECTED]> wrote: Anand, If the dump was taken from the slave then the binlog positions

Re: bin-log position.

2007-07-08 Thread Alex Arul Lurthu
Anand, If the dump was taken from the slave then the binlog positions that were dumped out are that of the slave. Now you might do 2 things : 1. Setup a slave of your master To do this use the binlog positions that you obtained using the command show slave status on your slave. The master

Re: bin-log position.

2007-07-08 Thread Ananda Kumar
Hi Alex, Thank you for the response, But i took the dump from slave and slave was in sync with master, so should i still be doing the restore from bin-log 3 from position 311. regards anandkl On 7/8/07, Alex Arul Lurthu <[EMAIL PROTECTED]> wrote: On 7/6/07, Ananda Kumar <[EMAIL PROTECTE

Re: bin-log position.

2007-07-07 Thread Alex Arul Lurthu
On 7/6/07, Ananda Kumar <[EMAIL PROTECTED]> wrote: -- CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.03', MASTER_LOG_POS=311; As see in the mysqldump is saying to start recovery from bin-log file "' mysql-bin.03'" and position="MASTER_LOG_POS=311", You need to use the positions specif

bin-log position.

2007-07-06 Thread Ananda Kumar
Hi All, We have setup master/slave replication in our production site. I took a mysqldump from slave using this command /usr/bin/mysqldump --user=andale -h prod -p abc --opt --all-databases --master-data=2 --flush-privileges --single-transaction > reports.dump When i checked reports.dump, it