Comment 4 for bug 439889

Revision history for this message
Sergey Petrunia (sergefp) wrote :

Hi Paul,

For SQL layer, #1 is true. It does build two objects for each source file. The regular server is compiled in sql/ while embedded server is in libmysqld/ (which is populated with symbolic links to sql/*.cc).

For storage engines, #1 is used by default.

There are storage engines that have some files that are dependent on server's internals and they've got a plug.in file directive named
 MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS which tells the build system that it needs to build two different copies, one for regular server and one for embedded.

For example, storage/heap/plug.in has:

MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(heap, [ha_heap.cc])

I've grepped for 'thd->' in PBXT source code, which hinted at the need to add:

MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(pbxt, [src/ha_pbxt.cc])
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(pbxt, [src/myxt_xt.cc])
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(pbxt, [src/discover_xt.cc])

The problem is that that doesn't work because it looks like at the moment each plugin can only have one MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS clause (see http://lists.mysql.com/internals/37339).

Does PBXT really need to depend so much on server internals? (from three files. other storage engines, e.g. InnoDB all have one dependant file).