On Wednesday 24 January 2001 09:47, Josef Chladek wrote:
>> I am currently investigating this. In the mean time, see if the following
>> workaround will solve the problem:
>>
>> CHANGE MASTER TO
>> MASTER_HOST='your-master',MASTER_USER='user',MASTER_PASSWORD='mast
>> er-pass',
>> MASTER_LOG_POS=position_from_master_info,MASTER_LOG_FILE='log_file
>> _from_master_info';
>> SLAVE START;
>
>will give that a try, downgraded to 3.23.31 - this works...
>thanks
>will report
>josef
Found the problem. First, the patch:
===== slave.cc 1.82 vs 1.83 =====
--- 1.82/sql/slave.cc Wed Jan 24 09:15:34 2001
+++ 1.83/sql/slave.cc Wed Jan 24 12:47:09 2001
@@ -509,14 +509,14 @@
return 1;
}
- if (!(length=my_b_gets(&mi->file, mi->log_file_name,
- sizeof(mi->log_file_name))))
+ if ((length=my_b_gets(&mi->file, mi->log_file_name,
+ sizeof(mi->log_file_name))) < 1)
{
msg="Error reading log file name from master info file ";
goto error;
}
- mi->log_file_name[length]= 0; // kill \n
+ mi->log_file_name[length-1]= 0; // kill \n
char buf[FN_REFLEN];
if(!my_b_gets(&mi->file, buf, sizeof(buf)))
{
Monty was cleaning up my code and accidentally introduced the bug, but
unfortunately, at that time we did not have a test case for starting the
slave with existing master.info without reset or change master to, so the bug
slipped by. Now I have added a test case for this ( rpl000017), so if
somebody decides to "clean up" that code again, we can catch this.
The bug only happens when you restart the server - SLAVE STOP/SLAVE START
will work ok. If you do not want to patch, downgrade or wait for 3.23.33, the
workaround to restart a slave is:
* cat /path/to/datadir/master.info
* get the log name and the offset
* start the slave server
* CHANGE MASTER TO MASTER_LOG_POS=saved_position,
MASTER_LOG_FILE='saved_log_name'
--
MySQL Development Team
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sasha Pachev <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/
/_/ /_/\_, /___/\___\_\___/ Provo, Utah, USA
<___/
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php