the dynamic InnoDB plugin, ha_innodb.so. This libtool option cannot
be used on every target platform. For instance, the AMD64 (x86_64) ABI
mandates position-independent code (PIC) in dynamic shared objects.
Makefile.am: Use $(INNODB_CFLAGS) and $(INNODB_DYNAMIC_CFLAGS) in
target-specific CFLAGS and CXXFLAGS variable definitions.
plug.in: Instead of appending to the MySQL-wide CFLAGS, introduce
the variables INNODB_CFLAGS and INNODB_DYNAMIC_CFLAGS. Depending on
$target_cpu, append -prefer-non-pic to INNODB_DYNAMIC_CFLAGS.
position-independent code in the compilation of ha_innodb.so.
ha_innodb_la_CXXFLAGS, ha_innodb_la_CFLAGS: Add -prefer-non-pic.
This flag is interpreted by the ../../libtool script that acts
as a front-end to the compiler and linker.
redefined so that the dynamic plugin can replace the builtin InnoDB
in MySQL 5.1.
ha_innodb.cc, handler0alter.cc: #include "univ.i" before any other InnoDB
header files or before defining any symbols
innodb_redefine.h: New file, to contain a mapping of symbols. The idea
is that this file will be replaced in the build process; because this
is a large file that can be generated automatically, it does not make sense
to keep it under version control.
univ.i: #include "innodb_redefine.h" and #define ha_innobase ha_innodb
Makefile.am (ha_innodb_la_CXXFLAGS): Remove -Dha_innobase=ha_innodb
NOTE: there are still some issues in the source code. One known issue is
the #undef mutex_free in sync0sync.h, which will cause the plugin to call the
function mutex_free in the builtin InnoDB. The preprocessor symbols defined
in innodb_redefine.h must not be undefined or redefined anywhere in the code.
to replace a built-in instance of InnoDB in mysqld. This is work in
progress, with several limitations:
* Other plugins defined in the builtin InnoDB are not disabled.
However, InnoDB in MySQL 5.1 only defines the storage engine plugin,
no INFORMATION_SCHEMA plugins.
* The global C symbols in ha_innodb.so except innodb_hton_ptr and
builtin_innobase_plugin will have to be redefined, e.g., by objcopy.
* The storage engine cannot be called "InnoDB" to avoid a conflict with
the builtin name. Here we call it InnoDBzip.
innobase_hton_name[]: Rename to "InnoDBzip" when building a dynamic plugin.
innodb_plugin_init(): New function for the dynamic plugin, to copy
and redirect configuration parameters from the builtin InnoDB.
innodb_dynamic: New configuration parameter. This has to be added
to the builtin InnoDB in MySQL 5.1. Also, innodb_hton_ptr must be made
global there.
innobase_init(): Interpret the parameter innodb_dynamic.
Makefile.am: Redefine class ha_innobase to ha_innodb by a preprocessor
define. Apparently, C++ classes cannot be easily renamed by objcopy.
Add a type that stores chunks of data in its own storage and avoids
duplicates. Supported methods:
ha_storage_create()
Allocates new storage object.
ha_storage_put()
Copies a given data chunk into the storage and returns pointer to the
copy. If the data chunk is already present, a pointer to the existing
object is returned and the given data chunk is not copied.
ha_storage_empty()
Clears (empties) the storage from all data chunks that are stored in it.
ha_storage_free()
Destroys a storage object. Opposite to ha_storage_create().
Approved by: Marko
innodb_lock_waits. See
https://svn.innodb.com/innobase/InformationSchema/TransactionsAndLocks
for design notes.
Things that need to be resolved before this goes live:
* MySQL must add thd_get_thread_id() function to their code
http://bugs.mysql.com/30930
* Allocate memory from mem_heap instead of using mem_alloc()
* Copy table name and index name into the cache because they may be
freed later which will result in referencing freed memory
Approved by: Marko
compressed pages from the buffer pool.
Makefile.am: Add buf0buddy.h, buf0buddy.ic.
buf/Makefile.am: Add buf0buddy.c.
Introduce the constants BUF_BUDDY_LOW and BUF_BUDDY_SIZES.
buf_pool_t: Add zip_mutex and the lists zip_clean and zip_free[].
buf_page_get_mutex(): Return &buf_pool->zip_mutex instead of NULL.
buf_buddy_get_offset(), buf_buddy_get(), buf_buddy_get_slot(),
buf_buddy_alloc_free(), buf_buddy_alloc_free_low(): New functions.
This will be needed for fixing Bug #22496.
REC_MAX_INDEX_COL_LEN: New constant, copied from DICT_MAX_INDEX_COL_LEN.
row_ext_create(), row_ext_lookup(), row_ext_lookup_low(): New functions.