summaryrefslogtreecommitdiff
path: root/storage/heap
diff options
context:
space:
mode:
authorbrian@zim.(none) <>2006-09-15 10:28:00 -0700
committerbrian@zim.(none) <>2006-09-15 10:28:00 -0700
commit7194b6d75abf490de0b2fc7b389ee8aa1d043377 (patch)
tree23dd89b8830f721d6e87266e1e75109a0c51996d /storage/heap
parent24df00f232daed11b55f23f6d160e1bfabc86fdd (diff)
downloadmariadb-git-7194b6d75abf490de0b2fc7b389ee8aa1d043377.tar.gz
This changes the order of the universe, black is now the new white.
In practice this means that handlerton is now created by the server and is passed to the engine. Plugin startups can now also control how plugins are inited (and can optionally pass values). Bit more flexibility to those who want to write plugin interfaces to the database.
Diffstat (limited to 'storage/heap')
-rw-r--r--storage/heap/ha_heap.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index 57777410bea..4f4025d1405 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -27,15 +27,17 @@
static handler *heap_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root);
-handlerton heap_hton;
+handlerton *heap_hton;
-int heap_init()
+int heap_init(void *p)
{
- heap_hton.state= SHOW_OPTION_YES;
- heap_hton.db_type= DB_TYPE_HEAP;
- heap_hton.create= heap_create_handler;
- heap_hton.panic= heap_panic;
- heap_hton.flags= HTON_CAN_RECREATE;
+ heap_hton= (handlerton *)p;
+ heap_hton->state= SHOW_OPTION_YES;
+ heap_hton->db_type= DB_TYPE_HEAP;
+ heap_hton->create= heap_create_handler;
+ heap_hton->panic= heap_panic;
+ heap_hton->flags= HTON_CAN_RECREATE;
+
return 0;
}
@@ -50,7 +52,7 @@ static handler *heap_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
*****************************************************************************/
ha_heap::ha_heap(TABLE_SHARE *table_arg)
- :handler(&heap_hton, table_arg), file(0), records_changed(0),
+ :handler(heap_hton, table_arg), file(0), records_changed(0),
key_stat_version(0)
{}
@@ -696,7 +698,7 @@ bool ha_heap::check_if_incompatible_data(HA_CREATE_INFO *info,
}
struct st_mysql_storage_engine heap_storage_engine=
-{ MYSQL_HANDLERTON_INTERFACE_VERSION, &heap_hton};
+{ MYSQL_HANDLERTON_INTERFACE_VERSION, heap_hton};
mysql_declare_plugin(heap)
{