List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:July 7 2011 5:47pm
Subject:Re: bzr commit into mysql-trunk branch (Georgi.Kodinov:3200)
Bug#11747191
View as plain text  
Hi, Nirbhay!

On Jul 05, Nirbhay Choubey wrote:
> Hi Joro,
> 
> Overall patch looks good, however I would suggest :
> 
> 1) The code
> 
> +    mysql_options(&mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
> +    mysql_options(&mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
> 
>       is getting repeated in all the client programs and rpl_slave.cc.
>       IMHO, we should add something like  'mysql_ssl_set_extended()'
>       in client.c to make it call 'mysql_ssl_set()' and further add
>       the two new  introduced options.

Note that extending mysql_options() is completely backward compatible.
Any client built with a newer library can later be perfectly used with
older libraries that users may happen to have on their computers.
mysql_options() will simply ignore unknown values (and return an error
that an application can check and do something).

If you add a new function to a client library, an application will
simply not start with an older library (with an unhelpful message
"symbol _mysql_ssl_set_extended was not found").

On the other hand, the patch changes struct st_mysql_options. Which is
even worse - not only it is backward incompatible, it is both forward
and backward incompatible. An application will not work with either
older or newer version of the library. And there will be no error on
startup - it will start just fine and crash some time later.

Generally for any incompatible change one needs to change the library
version. But in this case new options can simply be moved to struct
st_mysql_options_extention, which was created exactly for this purpose.

Regards,
Sergei

Thread
bzr commit into mysql-trunk branch (Georgi.Kodinov:3200) Bug#11747191Georgi Kodinov19 Jun
  • Re: bzr commit into mysql-trunk branch (Georgi.Kodinov:3200)Bug#11747191Nirbhay Choubey6 Jul
    • Re: bzr commit into mysql-trunk branch (Georgi.Kodinov:3200)Bug#11747191Sergei Golubchik7 Jul
      • Re: bzr commit into mysql-trunk branch (Georgi.Kodinov:3200) Bug#11747191Georgi Kodinov10 Jul