Re: Test this and reply to Jecelyn and bugs@...

Re: Test this and reply to Jecelyn and bugs@...

am 23.12.2002 17:09:56 von Jocelyn Fournier

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

----- Original Message -----
From: "Alexander Keremidarski"
To:
Cc:
Sent: Monday, December 23, 2002 12:41 PM
Subject: Re: Test this and reply to Jecelyn and bugs@...


> Hello Jocelyn,
>
>
>
>
> > SHOW STATUS LIKE 'rpl%';
> >
> > | Rpl_status | 137627919 |
> >
> > after a restart, I get :
> >
> > | Rpl_status | 137627983 |
> >
> > (uninitialized pointer ?)
>
> I repeated it with today's bk pull and build.
>
> With 4.1 built on Dec 17th I get
>
> Rpl_status | NULL
>
>
>
>
> --
> MySQL Conference and Expo 2003
http://www.mysql.com/events/uc2003/index.html
> For technical support contracts, visit https://order.mysql.com/?ref=msal
> __ ___ ___ ____ __
> / |/ /_ __/ __/ __ \/ / Mr. Alexander Keremidarski

> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
> /_/ /_/\_, /___/\___\_\___/ Sofia, Bulgaria
> <___/ www.mysql.com
>
>
>
>
>
>


------------------------------------------------------------ ---------
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 bugs-thread13346@lists.mysql.com
To unsubscribe, e-mail