2 messages in com.mysql.lists.bugsRe: Test this and reply to Jecelyn an...
FromSent OnAttachments
Jocelyn Fournier23 Dec 2002 08:09 
Sinisa Milivojevic24 Dec 2002 03:19 
Subject:Re: Test this and reply to Jecelyn and bugs@...
From:Sinisa Milivojevic (sin@mysql.com)
Date:12/24/2002 03:19:32 AM
List:com.mysql.lists.bugs

Jocelyn Fournier writes:

Hi,

I think I found the bug :

In sql_show.cc we have :

case SHOW_RPL_STATUS: end= int10_to_str((long) rpl_status_type[(int)rpl_status], buff, 10);

However rpl_status_type[] returns a const char* (defined in repl_failsafe.cc), so no conversion is needed here. I printed rpl_status, and it returns 6, which is the correct value. The following patch solves the problem for me :

===== sql_show.cc 1.102 vs edited ===== --- 1.102/sql/sql_show.cc Wed Dec 18 15:26:45 2002 +++ edited/sql_show.cc Mon Dec 23 15:50:10 2002 @@ -1469,7 +1469,7 @@ end= int10_to_str((long) thd->query_id, buff, 10); break; case SHOW_RPL_STATUS: - end= int10_to_str((long) rpl_status_type[(int)rpl_status], buff, 10); + end= strmov(buff, rpl_status_type[(int)rpl_status]); break; case SHOW_SLAVE_RUNNING: {

Regards, Jocelyn

Hi!

Thank you for your patch. We have some little tests to do, but it will be applied ....

Thanks again.

Join MySQL Users Conference and Expo: http://www.mysql.com/events/uc2003/