Bug #35544 ABI compatibility of pluggable storage engines
Submitted: 25 Mar 2008 9:19 Modified: 6 Jan 2011 15:48
Reporter: Sergei Golubchik Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Storage Engine API Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: CPU Architecture:Any

[25 Mar 2008 9:19] Sergei Golubchik
From: Kazuho Oku
To: internals@lists.mysql.com
Subject: ABI compatibility of pluggable storage engines
Date: Tue, 25 Mar 2008 11:52:53 +0900
List-Archive: http://lists.mysql.com/internals/35451

Is it possible to create a binary distribution of a pluggable storage engine?

Today I noticed that while the binary distribution of mysql server for
linux-i386 provided by MySQL AB uses --with-fast-mutex option, the
SuSE RPM version does not.  Since the configuration option changes the
definition of pthread_mutex_t, the size of type THR_LOCK becomes
different between the binary distributions of mysql server.  And IMHO
since it is a requirement to pass a THR_LOCK object allocated by a
pluggable storage engine to the mysql server through
handler::store_lock function, the difference causes ABI
incompatibility between the distributions from the viewpoint of
pluggable storage engines.

So my questions are:

Q1) Can the problem be overcome by adding a padding to type THR_LOCK?

From my understanding the problem can be solved by adding a padding to
THR_LOCK used in by pluggable storage engine, like the following.  Am
I correct?

struct new_engine_share_t {
  THR_LOCK store_lock;
  char padding[16];

Q2) Are there other incompatibility issues to take into consideration?

Thank you in advance.

How to repeat:
see http://lists.mysql.com/internals/35422 and http://lists.mysql.com/internals/35451