Commit 2c521319 authored by marko's avatar marko

branches/zip: Remove innodb_redefine.h and all references to it. The

file has been redundant since r2278.

include/innodb_redefine.h: Remove.

include/sync0sync.h: Remove the definition of mutex_free that was added
because of innodb_redefine.h.

include/univ.i: Remove references to innodb_redefine.h.  Explain why
the C++ classes need to be renamed.

scripts/build-plugin.sh: Build InnoDB only once.  The file
innodb_redefine.h is no longer needed.
parent 70a539b0
/* This file is needed for building a dynamic InnoDB plugin that
can replace the builtin InnoDB plugin in MySQL.
It must be generated as follows:
* compile the InnoDB plugin
* overwrite include/innodb_redefine.h with the following command
* compile the final InnoDB plugin
nm .libs/ha_innodb.so.0.0.0|
sed -ne 's/^[^ ]* . \([a-zA-Z][a-zA-Z0-9_]*\)$/#define \1 ibd_\1/p'|
grep -v 'innodb_hton_ptr\|builtin_innobase_plugin' > include/innodb_redefine.h
*/
...@@ -76,10 +76,6 @@ the mutex is freed. Removes a mutex object from the mutex list. The mutex ...@@ -76,10 +76,6 @@ the mutex is freed. Removes a mutex object from the mutex list. The mutex
is checked to be in the reset state. */ is checked to be in the reset state. */
#undef mutex_free /* Fix for MacOS X */ #undef mutex_free /* Fix for MacOS X */
#define mutex_free mutex0_free /* Fix for innodb_redefine.h;
we must not undefine symbols
defined there; thus, that file
will use mutex0_free. */
void void
mutex_free( mutex_free(
/*=======*/ /*=======*/
......
...@@ -10,19 +10,12 @@ Created 1/20/1994 Heikki Tuuri ...@@ -10,19 +10,12 @@ Created 1/20/1994 Heikki Tuuri
#define univ_i #define univ_i
#ifdef MYSQL_DYNAMIC_PLUGIN #ifdef MYSQL_DYNAMIC_PLUGIN
/* In the dynamic plugin, redefine all symbols not to conflict with /* In the dynamic plugin, redefine some externally visible symbols
the symbols of a builtin InnoDB. The build process works as follows: in order not to conflict with the symbols of a builtin InnoDB. */
* compile the InnoDB plugin using an empty include/innodb_redefine.h /* Rename all C++ classes that contain virtual functions, because we
* overwrite include/innodb_redefine.h with the following command have not figured out how to apply the visibility=hidden attribute to
* compile the final InnoDB plugin the virtual method table (vtable) in GCC 3. */
nm .libs/ha_innodb.so.0.0.0|
sed -ne 's/^[^ ]* . \([a-zA-Z][a-zA-Z0-9_]*\)$/#define \1 ibd_\1/p'|
grep -v 'innodb_hton_ptr\|builtin_innobase_plugin' > include/innodb_redefine.h
*/
# include "innodb_redefine.h"
/* Redefine all C++ classes here. */
# define ha_innobase ha_innodb # define ha_innobase ha_innodb
#endif /* MYSQL_DYNAMIC_PLUGIN */ #endif /* MYSQL_DYNAMIC_PLUGIN */
......
...@@ -144,23 +144,6 @@ if [ ! -f include/mysqld_error.h ]; then ...@@ -144,23 +144,6 @@ if [ ! -f include/mysqld_error.h ]; then
(cd extra; $MAKE ../include/mysqld_error.h) (cd extra; $MAKE ../include/mysqld_error.h)
fi fi
# Compile the InnoDB plugin, we do this twice because after the first build # Compile the InnoDB plugin.
# we extract the global symbols from the .so and create a header file that cd $INNODIR
# renames the global symbols with a prefix of "ibd_". The second build is exec $MAKE
# with the renamed global symbols.
(
cd $INNODIR
echo "Building InnoDB plugin first pass ..."
$MAKE > /dev/null
nm -g .libs/ha_innodb.so |
sed -ne 's/^[^ ]* . \([a-zA-Z][a-zA-Z0-9_]*\)$/#define \1 ibd_\1/p' |
grep -v 'innodb_hton_ptr\|builtin_innobase_plugin' \
> include/innodb_redefine.h
echo "Building InnoDB plugin second pass ..."
$MAKE > /dev/null
)
exit 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment