List:Packagers« Previous MessageNext Message »
From:Tom Lane Date:March 20 2006 9:35pm
Subject:Re: 5.0.19 libmysqlclient not ABI-compatible with 5.0.18
View as plain text  
Christian Hammers <ch@stripped> writes:
> On 2006-03-18 Tom Lane wrote:
>>> Is it intentional that 5.0.19 breaks binary compatibility with clients
>>> built against 5.0.18?  

> Could you be more verbose then, what the issue is?

5.0.19 has added a field to the MYSQL struct that was not there before.
For clients that use a MYSQL struct they have allocated themselves
(rather than allowing mysql_init to allocate it), this breaks binary
compatibility, because they won't have made the struct large enough.

$ diff -c mysql-5.0.18/include/mysql.h mysql-5.0.19/include/mysql.h
...
***************
*** 287,292 ****
--- 287,294 ----
      from mysql_stmt_close if close had to cancel result set of this object.
    */
    my_bool *unbuffered_fetch_owner;
+   /* needed for embedded server - no net buffer to store the 'info' */
+   char *info_buffer;
  } MYSQL;

  typedef struct st_mysql_res {
***************

I don't know why the MYSQL struct wasn't made abstract in the first
place, but given that mysql has chosen to expose it to client apps,
they can't change it (not this much anyway) without creating an ABI
break.

> For distributions like Debian it's a big deal when binary
> compatibility breaks without anybody being aware :)

No kidding.  Red Hat has backed off our intention to ship 5.0.19 at all.
What I want to know is, should I file a bug report or is this change
intentional?  (And if the latter, why wasn't there a .so version bump?)

			regards, tom lane
Thread
5.0.19 libmysqlclient not ABI-compatible with 5.0.18Tom Lane17 Mar
  • Re: 5.0.19 libmysqlclient not ABI-compatible with 5.0.18Christian Hammers18 Mar
    • Re: 5.0.19 libmysqlclient not ABI-compatible with 5.0.18Tom Lane18 Mar
      • Re: 5.0.19 libmysqlclient not ABI-compatible with 5.0.18Christian Hammers20 Mar
        • Re: 5.0.19 libmysqlclient not ABI-compatible with 5.0.18Tom Lane20 Mar
          • Re: 5.0.19 libmysqlclient not ABI-compatible with 5.0.18Lenz Grimmer22 Mar
  • Re: 5.0.19 libmysqlclient not ABI-compatible with 5.0.18Colin Charles21 Mar