List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:August 10 2007 12:57pm
Subject:Re: bk commit into 5.0 tree (tnurnberg:1.2476) BUG#15327
View as plain text  
Hi!

On Aug 09, Timothy Smith wrote:
> Tatjana, Serg,
> 
> On 09 August 2007, Sergei Golubchik <serg@stripped> wrote:
> > That's 49K - a bit too many for a change that only needs a few
> > lines of changes.
> 
> I don't agree with this.  The vast majority of those lines are because
> the my_long_options array had to be defined before main() in order for
> mysql_client_port_setup() to poke the correct default value in there.
> And that's needed in order to provide the correct information in --help.

Well, precisely.

Patching my_long_options[] is a hack.
Exposing external functionality of my_getopt() is a hack.
Neither makes the code clearer or more maintainable.

> Aside from moving that array, the patch just inserts a call to
> mysql_client_port_setup() near the top of main() - simple enough.

And in all client programs. The old code was doing it in one place,
in the library that all client programs use.
 
> > And it doesn't fix scripts. By default they will use 3306 but the
> > server will use the value from /etc/services.
> 
> This is already a problem, and I suggested to Tatjana that it be
> covered under a separate bug.  Maybe I'm missing something, but I
> don't think this patch makes this problem worse.

No, it does not.

But if solving the second bug would require the solution for the first
to be reverted, I see a little value in a stepwise approach.

And, yes, I believe these bugs are similar enough to require one
solution for both, they should not be fixed independently.

Regards / Mit vielen Grüssen,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  Principal Software Developer
/_/  /_/\_, /___/\___\_\___/  MySQL GmbH, Radlkoferstr. 2, D-81373 München
       <___/                  Geschäftsführer: Kaj Arnö - HRB
München 162140
Thread
bk commit into 5.0 tree (tnurnberg:1.2476) BUG#15327Tatjana A Nuernberg8 Aug
  • Re: bk commit into 5.0 tree (tnurnberg:1.2476) BUG#15327Sergei Golubchik9 Aug
Re: bk commit into 5.0 tree (tnurnberg:1.2476) BUG#15327Timothy Smith9 Aug
  • Re: bk commit into 5.0 tree (tnurnberg:1.2476) BUG#15327Sergei Golubchik10 Aug
Re: bk commit into 5.0 tree (tnurnberg:1.2476) BUG#15327Timothy Smith9 Aug