diff options
author | unknown <brian@zim.(none)> | 2006-09-15 10:28:00 -0700 |
---|---|---|
committer | unknown <brian@zim.(none)> | 2006-09-15 10:28:00 -0700 |
commit | d79485a9be6b2f638fd268aae9c4d0b4056a85d5 (patch) | |
tree | 23dd89b8830f721d6e87266e1e75109a0c51996d /storage/archive | |
parent | e7a27b6a5812c87fc4e3064f3bdc4f92ff67a5e2 (diff) | |
download | mariadb-git-d79485a9be6b2f638fd268aae9c4d0b4056a85d5.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.
include/mysql/plugin.h:
Optional to pass parameter now to init and deinit functions
sql/ha_ndbcluster.cc:
Cleanup, handlerton is now a pointer.
sql/ha_ndbcluster_binlog.cc:
Cleanup (handlerton is now a pointer)
sql/ha_ndbcluster_binlog.h:
Cleanup (handlerton is now a pointer)
sql/ha_partition.cc:
Cleaned up handlerton change
sql/handler.cc:
Cheanup of handlerton change
sql/item_sum.cc:
Cleanedup of handlerton change
sql/log.cc:
Cleanup of handlerton change
sql/mysql_priv.h:
Reverted patch for variables (what would have happen previously if a have_ would have been called that was dynamically loaded? boom!)
sql/mysqld.cc:
Cleanup of handlerton changes and reverted have variable patch
sql/partition_info.cc:
Cleanup of handlerton (we need to clean this up a bit more).
sql/set_var.cc:
Cleanup related to handlerton changes
sql/sql_cache.cc:
Handlerton changes cleanup
sql/sql_insert.cc:
Handlerton changes cleanup.
sql/sql_partition.cc:
Handlerton cleanup changes
sql/sql_plugin.cc:
Handlerton changes.
init() can now be controlled by a plugin specific startup.
There was also an issue with how we deinited the status variables. It should have been occuring before we shut down the engines.
sql/sql_select.cc:
Handlerton cleanup changes
sql/sql_show.cc:
Handlerton cleanup changes
sql/sql_table.cc:
Handlerton cleanup changes
sql/table.cc:
Cleanup
storage/archive/ha_archive.cc:
Cleanup
storage/archive/ha_archive.h:
Cleanup
storage/blackhole/ha_blackhole.cc:
Cleanup
storage/csv/ha_tina.cc:
Cleanup
storage/example/ha_example.cc:
Cleanup
storage/federated/ha_federated.cc:
Cleanup
storage/heap/ha_heap.cc:
Cleanup
storage/innobase/handler/ha_innodb.cc:
Cleanup
storage/myisam/ha_myisam.cc:
Cleanup
storage/myisammrg/ha_myisammrg.cc:
Cleanup
Diffstat (limited to 'storage/archive')
-rw-r--r-- | storage/archive/ha_archive.cc | 26 | ||||
-rw-r--r-- | storage/archive/ha_archive.h | 1 |
2 files changed, 13 insertions, 14 deletions
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc index 3029b1db53e..c31bbfd612e 100644 --- a/storage/archive/ha_archive.cc +++ b/storage/archive/ha_archive.cc @@ -145,7 +145,7 @@ static handler *archive_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root); */ #define ARCHIVE_MIN_ROWS_TO_USE_BULK_INSERT 2 -handlerton archive_hton; +handlerton *archive_hton; static handler *archive_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root) { @@ -168,24 +168,24 @@ static byte* archive_get_key(ARCHIVE_SHARE *share,uint *length, SYNOPSIS archive_db_init() - void + void * RETURN FALSE OK TRUE Error */ -int archive_db_init() +int archive_db_init(void *p) { DBUG_ENTER("archive_db_init"); if (archive_inited) DBUG_RETURN(FALSE); - - archive_hton.state=SHOW_OPTION_YES; - archive_hton.db_type=DB_TYPE_ARCHIVE_DB; - archive_hton.create=archive_create_handler; - archive_hton.panic=archive_db_end; - archive_hton.flags=HTON_NO_FLAGS; + archive_hton= (handlerton *)p; + archive_hton->state=SHOW_OPTION_YES; + archive_hton->db_type=DB_TYPE_ARCHIVE_DB; + archive_hton->create=archive_create_handler; + archive_hton->panic=archive_db_end; + archive_hton->flags=HTON_NO_FLAGS; if (pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST)) goto error; @@ -214,7 +214,7 @@ error: FALSE OK */ -int archive_db_done() +int archive_db_done(void *p) { if (archive_inited) { @@ -228,11 +228,11 @@ int archive_db_done() int archive_db_end(ha_panic_function type) { - return archive_db_done(); + return archive_db_done(NULL); } ha_archive::ha_archive(TABLE_SHARE *table_arg) - :handler(&archive_hton, table_arg), delayed_insert(0), bulk_insert(0) + :handler(archive_hton, table_arg), delayed_insert(0), bulk_insert(0) { /* Set our original buffer from pre-allocated memory */ buffer.set((char *)byte_buffer, IO_SIZE, system_charset_info); @@ -1571,7 +1571,7 @@ bool ha_archive::check_and_repair(THD *thd) } struct st_mysql_storage_engine archive_storage_engine= -{ MYSQL_HANDLERTON_INTERFACE_VERSION, &archive_hton }; +{ MYSQL_HANDLERTON_INTERFACE_VERSION, archive_hton }; mysql_declare_plugin(archive) { diff --git a/storage/archive/ha_archive.h b/storage/archive/ha_archive.h index 0485b7e9f9c..d1069afd87f 100644 --- a/storage/archive/ha_archive.h +++ b/storage/archive/ha_archive.h @@ -139,6 +139,5 @@ public: bool check_and_repair(THD *thd); }; -int archive_db_init(void); int archive_db_end(ha_panic_function type); |