summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2006-09-29 17:19:02 -0700
committerunknown <brian@zim.(none)>2006-09-29 17:19:02 -0700
commit48d5b3bd1fbe582307277b2e5ed052d58da3a2f9 (patch)
tree86822c6e236ae413ea0e3e59826a816c678a4fa9
parent62c30cd5d3ec011e7255f0de9c8bcea5ee83fc3d (diff)
downloadmariadb-git-48d5b3bd1fbe582307277b2e5ed052d58da3a2f9.tar.gz
This removes the passing of global hton to engine instance.
sql/ha_ndbcluster.cc: Removed global hton sql/ha_ndbcluster.h: Removed global hton need sql/ha_partition.cc: Removed global hton sql/ha_partition.h: Removed global hton sql/handler.cc: Removed global hton sql/handler.h: Removed global hton storage/archive/ha_archive.cc: Removed global hton storage/archive/ha_archive.h: Global hton removed storage/blackhole/ha_blackhole.cc: Global removed hton storage/blackhole/ha_blackhole.h: Global hton removal storage/csv/ha_tina.cc: Global hton removal storage/csv/ha_tina.h: Removed global removed storage/example/ha_example.cc: Global removed hton storage/example/ha_example.h: Global removed hton storage/federated/ha_federated.cc: Global removed hton storage/federated/ha_federated.h: Global removed hton storage/heap/ha_heap.cc: Global removed hton storage/heap/ha_heap.h: Global removed hton storage/innobase/handler/ha_innodb.cc: Global removed hton storage/innobase/handler/ha_innodb.h: Removed global hton storage/myisam/ha_myisam.cc: Globally removed hton storage/myisam/ha_myisam.h: Globally removed hton storage/myisammrg/ha_myisammrg.cc: Globally removed hton storage/myisammrg/ha_myisammrg.h: Globaly removed hton
-rw-r--r--sql/ha_ndbcluster.cc11
-rw-r--r--sql/ha_ndbcluster.h2
-rw-r--r--sql/ha_partition.cc16
-rw-r--r--sql/ha_partition.h4
-rw-r--r--sql/handler.cc8
-rw-r--r--sql/handler.h2
-rw-r--r--storage/archive/ha_archive.cc14
-rw-r--r--storage/archive/ha_archive.h2
-rw-r--r--storage/blackhole/ha_blackhole.cc10
-rw-r--r--storage/blackhole/ha_blackhole.h2
-rw-r--r--storage/csv/ha_tina.cc14
-rw-r--r--storage/csv/ha_tina.h2
-rw-r--r--storage/example/ha_example.cc14
-rw-r--r--storage/example/ha_example.h2
-rw-r--r--storage/federated/ha_federated.cc13
-rw-r--r--storage/federated/ha_federated.h2
-rw-r--r--storage/heap/ha_heap.cc14
-rw-r--r--storage/heap/ha_heap.h2
-rw-r--r--storage/innobase/handler/ha_innodb.cc11
-rw-r--r--storage/innobase/handler/ha_innodb.h2
-rw-r--r--storage/myisam/ha_myisam.cc20
-rw-r--r--storage/myisam/ha_myisam.h2
-rw-r--r--storage/myisammrg/ha_myisammrg.cc9
-rw-r--r--storage/myisammrg/ha_myisammrg.h2
24 files changed, 105 insertions, 75 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 157af825063..7203dc06e58 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -82,10 +82,11 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond)
handlerton *ndbcluster_hton;
-static handler *ndbcluster_create_handler(TABLE_SHARE *table,
+static handler *ndbcluster_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
MEM_ROOT *mem_root)
{
- return new (mem_root) ha_ndbcluster(table);
+ return new (mem_root) ha_ndbcluster(hton, table);
}
static uint ndbcluster_partition_flags()
@@ -5552,8 +5553,8 @@ void ha_ndbcluster::get_auto_increment(ulonglong offset, ulonglong increment,
HA_HAS_OWN_BINLOGGING | \
HA_HAS_RECORDS
-ha_ndbcluster::ha_ndbcluster(TABLE_SHARE *table_arg):
- handler(ndbcluster_hton, table_arg),
+ha_ndbcluster::ha_ndbcluster(handlerton *hton, TABLE_SHARE *table_arg):
+ handler(hton, table_arg),
m_active_trans(NULL),
m_active_cursor(NULL),
m_table(NULL),
@@ -6623,7 +6624,7 @@ void ndbcluster_print_error(int error, const NdbOperation *error_op)
share.db.length= 0;
share.table_name.str= (char *) tab_name;
share.table_name.length= strlen(tab_name);
- ha_ndbcluster error_handler(&share);
+ ha_ndbcluster error_handler(ndbcluster_hton, &share);
error_handler.print_error(error, MYF(0));
DBUG_VOID_RETURN;
}
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h
index 5cd5bb2c716..19ff513f9b1 100644
--- a/sql/ha_ndbcluster.h
+++ b/sql/ha_ndbcluster.h
@@ -627,7 +627,7 @@ class Thd_ndb
class ha_ndbcluster: public handler
{
public:
- ha_ndbcluster(TABLE_SHARE *table);
+ ha_ndbcluster(handlerton *hton, TABLE_SHARE *table);
~ha_ndbcluster();
int ha_initialise();
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 8e704f34550..d2b05df5ffc 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -69,7 +69,8 @@ static PARTITION_SHARE *get_share(const char *table_name, TABLE * table);
MODULE create/delete handler object
****************************************************************************/
-static handler *partition_create_handler(TABLE_SHARE *share,
+static handler *partition_create_handler(handlerton *hton,
+ TABLE_SHARE *share,
MEM_ROOT *mem_root);
static uint partition_flags();
static uint alter_table_flags(uint flags);
@@ -102,10 +103,11 @@ static int partition_initialize(void *p)
New partition object
*/
-static handler *partition_create_handler(TABLE_SHARE *share,
+static handler *partition_create_handler(handlerton *hton,
+ TABLE_SHARE *share,
MEM_ROOT *mem_root)
{
- ha_partition *file= new (mem_root) ha_partition(share);
+ ha_partition *file= new (mem_root) ha_partition(hton, share);
if (file && file->initialise_partition(mem_root))
{
delete file;
@@ -155,8 +157,8 @@ static uint alter_table_flags(uint flags __attribute__((unused)))
NONE
*/
-ha_partition::ha_partition(TABLE_SHARE *share)
- :handler(partition_hton, share), m_part_info(NULL), m_create_handler(FALSE),
+ha_partition::ha_partition(handlerton *hton, TABLE_SHARE *share)
+ :handler(hton, share), m_part_info(NULL), m_create_handler(FALSE),
m_is_sub_partitioned(0)
{
DBUG_ENTER("ha_partition::ha_partition(table)");
@@ -176,8 +178,8 @@ ha_partition::ha_partition(TABLE_SHARE *share)
NONE
*/
-ha_partition::ha_partition(partition_info *part_info)
- :handler(partition_hton, NULL), m_part_info(part_info),
+ha_partition::ha_partition(handlerton *hton, partition_info *part_info)
+ :handler(hton, NULL), m_part_info(part_info),
m_create_handler(TRUE),
m_is_sub_partitioned(m_part_info->is_sub_partitioned())
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index 97086d7b632..b66db205549 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -149,8 +149,8 @@ public:
partition handler.
-------------------------------------------------------------------------
*/
- ha_partition(TABLE_SHARE * table);
- ha_partition(partition_info * part_info);
+ ha_partition(handlerton *hton, TABLE_SHARE * table);
+ ha_partition(handlerton *hton, partition_info * part_info);
~ha_partition();
/*
A partition handler has no characteristics in itself. It only inherits
diff --git a/sql/handler.cc b/sql/handler.cc
index 7848552f3de..bfb50653568 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -170,7 +170,7 @@ const char *ha_get_storage_engine(enum legacy_db_type db_type)
static handler *create_default(TABLE_SHARE *table, MEM_ROOT *mem_root)
{
handlerton *hton= ha_default_handlerton(current_thd);
- return (hton && hton->create) ? hton->create(table, mem_root) : NULL;
+ return (hton && hton->create) ? hton->create(hton, table, mem_root) : NULL;
}
@@ -232,7 +232,7 @@ handler *get_new_handler(TABLE_SHARE *share, MEM_ROOT *alloc,
if (db_type && db_type->state == SHOW_OPTION_YES && db_type->create)
{
- if ((file= db_type->create(share, alloc)))
+ if ((file= db_type->create(db_type, share, alloc)))
file->init();
DBUG_RETURN(file);
}
@@ -251,7 +251,7 @@ handler *get_ha_partition(partition_info *part_info)
{
ha_partition *partition;
DBUG_ENTER("get_ha_partition");
- if ((partition= new ha_partition(part_info)))
+ if ((partition= new ha_partition(partition_hton, part_info)))
{
if (partition->initialise_partition(current_thd->mem_root))
{
@@ -3296,7 +3296,7 @@ static my_bool exts_handlerton(THD *unused, st_plugin_int *plugin,
handlerton *hton= (handlerton *)plugin->data;
handler *file;
if (hton->state == SHOW_OPTION_YES && hton->create &&
- (file= hton->create((TABLE_SHARE*) 0, current_thd->mem_root)))
+ (file= hton->create(hton, (TABLE_SHARE*) 0, current_thd->mem_root)))
{
List_iterator_fast<char> it(*found_exts);
const char **ext, *old_ext;
diff --git a/sql/handler.h b/sql/handler.h
index 21ddb2c97d9..9bd06015b4a 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -633,7 +633,7 @@ struct handlerton
void *(*create_cursor_read_view)();
void (*set_cursor_read_view)(void *);
void (*close_cursor_read_view)(void *);
- handler *(*create)(TABLE_SHARE *table, MEM_ROOT *mem_root);
+ handler *(*create)(handlerton *hton, TABLE_SHARE *table, MEM_ROOT *mem_root);
void (*drop_database)(char* path);
int (*panic)(enum ha_panic_function flag);
int (*start_consistent_snapshot)(THD *thd);
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc
index 3971c4d73f0..a5a03f4f849 100644
--- a/storage/archive/ha_archive.cc
+++ b/storage/archive/ha_archive.cc
@@ -139,7 +139,9 @@ static HASH archive_open_tables;
#define ARCHIVE_CHECK_HEADER 254 // The number we use to determine corruption
/* Static declarations for handerton */
-static handler *archive_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root);
+static handler *archive_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
+ MEM_ROOT *mem_root);
/*
Number of rows that will force a bulk insert.
*/
@@ -147,9 +149,11 @@ static handler *archive_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root);
handlerton *archive_hton;
-static handler *archive_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
+static handler *archive_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
+ MEM_ROOT *mem_root)
{
- return new (mem_root) ha_archive(table);
+ return new (mem_root) ha_archive(hton, table);
}
/*
@@ -231,8 +235,8 @@ int archive_db_end(ha_panic_function type)
return archive_db_done(NULL);
}
-ha_archive::ha_archive(TABLE_SHARE *table_arg)
- :handler(archive_hton, table_arg), delayed_insert(0), bulk_insert(0)
+ha_archive::ha_archive(handlerton *hton, TABLE_SHARE *table_arg)
+ :handler(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);
diff --git a/storage/archive/ha_archive.h b/storage/archive/ha_archive.h
index d1069afd87f..7f64f2f385d 100644
--- a/storage/archive/ha_archive.h
+++ b/storage/archive/ha_archive.h
@@ -67,7 +67,7 @@ class ha_archive: public handler
uint current_k_offset;
public:
- ha_archive(TABLE_SHARE *table_arg);
+ ha_archive(handlerton *hton, TABLE_SHARE *table_arg);
~ha_archive()
{
}
diff --git a/storage/blackhole/ha_blackhole.cc b/storage/blackhole/ha_blackhole.cc
index 2ebe43acd4d..c0ad28785bd 100644
--- a/storage/blackhole/ha_blackhole.cc
+++ b/storage/blackhole/ha_blackhole.cc
@@ -25,10 +25,11 @@
/* Static declarations for handlerton */
handlerton *blackhole_hton;
-static handler *blackhole_create_handler(TABLE_SHARE *table,
+static handler *blackhole_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
MEM_ROOT *mem_root)
{
- return new (mem_root) ha_blackhole(table);
+ return new (mem_root) ha_blackhole(hton, table);
}
@@ -36,8 +37,9 @@ static handler *blackhole_create_handler(TABLE_SHARE *table,
** BLACKHOLE tables
*****************************************************************************/
-ha_blackhole::ha_blackhole(TABLE_SHARE *table_arg)
- :handler(blackhole_hton, table_arg)
+ha_blackhole::ha_blackhole(handlerton *hton,
+ TABLE_SHARE *table_arg)
+ :handler(hton, table_arg)
{}
diff --git a/storage/blackhole/ha_blackhole.h b/storage/blackhole/ha_blackhole.h
index 55c26f6f02e..54cec41fd26 100644
--- a/storage/blackhole/ha_blackhole.h
+++ b/storage/blackhole/ha_blackhole.h
@@ -28,7 +28,7 @@ class ha_blackhole: public handler
THR_LOCK thr_lock;
public:
- ha_blackhole(TABLE_SHARE *table_arg);
+ ha_blackhole(handlerton *hton, TABLE_SHARE *table_arg);
~ha_blackhole()
{
}
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 8007ebfecd1..3cdfc04f2ce 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -74,7 +74,9 @@ static int write_meta_file(File meta_file, ha_rows rows, bool dirty);
pthread_mutex_t tina_mutex;
static HASH tina_open_tables;
static int tina_init= 0;
-static handler *tina_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root);
+static handler *tina_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
+ MEM_ROOT *mem_root);
off_t Transparent_file::read_next()
{
@@ -493,14 +495,16 @@ off_t find_eoln_buff(Transparent_file *data_buff, off_t begin,
}
-static handler *tina_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
+static handler *tina_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
+ MEM_ROOT *mem_root)
{
- return new (mem_root) ha_tina(table);
+ return new (mem_root) ha_tina(hton, table);
}
-ha_tina::ha_tina(TABLE_SHARE *table_arg)
- :handler(tina_hton, table_arg),
+ha_tina::ha_tina(handlerton *hton, TABLE_SHARE *table_arg)
+ :handler(hton, table_arg),
/*
These definitions are found in handler.h
They are not probably completely right.
diff --git a/storage/csv/ha_tina.h b/storage/csv/ha_tina.h
index 14ca848c855..d9537c42259 100644
--- a/storage/csv/ha_tina.h
+++ b/storage/csv/ha_tina.h
@@ -129,7 +129,7 @@ private:
int init_tina_writer();
public:
- ha_tina(TABLE_SHARE *table_arg);
+ ha_tina(handlerton *hton, TABLE_SHARE *table_arg);
~ha_tina()
{
if (chain_alloced)
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc
index 1b49cbbae5a..68840a41879 100644
--- a/storage/example/ha_example.cc
+++ b/storage/example/ha_example.cc
@@ -73,7 +73,9 @@
#include <mysql/plugin.h>
-static handler *example_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root);
+static handler *example_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
+ MEM_ROOT *mem_root);
static int example_init_func();
static bool example_init_func_for_handlerton();
static int example_panic(enum ha_panic_function flag);
@@ -201,14 +203,16 @@ static int free_share(EXAMPLE_SHARE *share)
}
-static handler* example_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
+static handler* example_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
+ MEM_ROOT *mem_root)
{
- return new (mem_root) ha_example(table);
+ return new (mem_root) ha_example(hton, table);
}
-ha_example::ha_example(TABLE_SHARE *table_arg)
- :handler(example_hton, table_arg)
+ha_example::ha_example(handlerton *hton, TABLE_SHARE *table_arg)
+ :handler(hton, table_arg)
{}
/*
diff --git a/storage/example/ha_example.h b/storage/example/ha_example.h
index 956dc62311c..2f5dbc29c56 100644
--- a/storage/example/ha_example.h
+++ b/storage/example/ha_example.h
@@ -45,7 +45,7 @@ class ha_example: public handler
EXAMPLE_SHARE *share; /* Shared lock info */
public:
- ha_example(TABLE_SHARE *table_arg);
+ ha_example(handlerton *hton, TABLE_SHARE *table_arg);
~ha_example()
{
}
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index ecfaa9dff2d..c7805e724f5 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -359,7 +359,8 @@ static const uint sizeof_trailing_and= sizeof(" AND ") - 1;
static const uint sizeof_trailing_where= sizeof(" WHERE ") - 1;
/* Static declaration for handerton */
-static handler *federated_create_handler(TABLE_SHARE *table,
+static handler *federated_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
MEM_ROOT *mem_root);
static int federated_commit(THD *thd, bool all);
static int federated_rollback(THD *thd, bool all);
@@ -368,10 +369,11 @@ static int federated_rollback(THD *thd, bool all);
handlerton *federated_hton;
-static handler *federated_create_handler(TABLE_SHARE *table,
+static handler *federated_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
MEM_ROOT *mem_root)
{
- return new (mem_root) ha_federated(table);
+ return new (mem_root) ha_federated(hton, table);
}
@@ -723,8 +725,9 @@ error:
** FEDERATED tables
*****************************************************************************/
-ha_federated::ha_federated(TABLE_SHARE *table_arg)
- :handler(federated_hton, table_arg),
+ha_federated::ha_federated(handlerton *hton,
+ TABLE_SHARE *table_arg)
+ :handler(hton, table_arg),
mysql(0), stored_result(0)
{
trx_next= 0;
diff --git a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h
index ebdc775d3bf..385510960a6 100644
--- a/storage/federated/ha_federated.h
+++ b/storage/federated/ha_federated.h
@@ -94,7 +94,7 @@ private:
int stash_remote_error();
public:
- ha_federated(TABLE_SHARE *table_arg);
+ ha_federated(handlerton *hton, TABLE_SHARE *table_arg);
~ha_federated() {}
/* The name that will be used for display purposes */
const char *table_type() const { return "FEDERATED"; }
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index 1b76b24bd5d..5991fdbf987 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -25,7 +25,9 @@
#include "ha_heap.h"
-static handler *heap_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root);
+static handler *heap_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
+ MEM_ROOT *mem_root);
handlerton *heap_hton;
@@ -41,9 +43,11 @@ int heap_init(void *p)
return 0;
}
-static handler *heap_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
+static handler *heap_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
+ MEM_ROOT *mem_root)
{
- return new (mem_root) ha_heap(table);
+ return new (mem_root) ha_heap(hton, table);
}
@@ -51,8 +55,8 @@ static handler *heap_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
** HEAP tables
*****************************************************************************/
-ha_heap::ha_heap(TABLE_SHARE *table_arg)
- :handler(heap_hton, table_arg), file(0), records_changed(0),
+ha_heap::ha_heap(handlerton *hton, TABLE_SHARE *table_arg)
+ :handler(hton, table_arg), file(0), records_changed(0),
key_stat_version(0)
{}
diff --git a/storage/heap/ha_heap.h b/storage/heap/ha_heap.h
index 00e59856f26..0f6386655cb 100644
--- a/storage/heap/ha_heap.h
+++ b/storage/heap/ha_heap.h
@@ -31,7 +31,7 @@ class ha_heap: public handler
uint records_changed;
uint key_stat_version;
public:
- ha_heap(TABLE_SHARE *table);
+ ha_heap(handlerton *hton, TABLE_SHARE *table);
~ha_heap() {}
const char *table_type() const
{
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 8fa04246769..3fb0ab902e0 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -203,16 +203,19 @@ static int innobase_rollback(THD* thd, bool all);
static int innobase_rollback_to_savepoint(THD* thd, void *savepoint);
static int innobase_savepoint(THD* thd, void *savepoint);
static int innobase_release_savepoint(THD* thd, void *savepoint);
-static handler *innobase_create_handler(TABLE_SHARE *table,
+static handler *innobase_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
MEM_ROOT *mem_root);
static const char innobase_hton_name[]= "InnoDB";
handlerton *innobase_hton;
-static handler *innobase_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
+static handler *innobase_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
+ MEM_ROOT *mem_root)
{
- return new (mem_root) ha_innobase(table);
+ return new (mem_root) ha_innobase(hton, table);
}
@@ -889,7 +892,7 @@ check_trx_exists(
/*************************************************************************
Construct ha_innobase handler. */
-ha_innobase::ha_innobase(TABLE_SHARE *table_arg)
+ha_innobase::ha_innobase(handlerton *hton, TABLE_SHARE *table_arg)
:handler(innobase_hton, table_arg),
int_table_flags(HA_REC_NOT_IN_SEQ |
HA_NULL_IN_KEY |
diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h
index 4d5dc6b52d6..d87d9111139 100644
--- a/storage/innobase/handler/ha_innodb.h
+++ b/storage/innobase/handler/ha_innodb.h
@@ -80,7 +80,7 @@ class ha_innobase: public handler
/* Init values for the class: */
public:
- ha_innobase(TABLE_SHARE *table_arg);
+ ha_innobase(handlerton *hton, TABLE_SHARE *table_arg);
~ha_innobase() {}
/*
Get the row type from the storage engine. If this method returns
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index da4b4307f21..ae4dcfc3f8b 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -48,9 +48,11 @@ TYPELIB myisam_stats_method_typelib= {
** MyISAM tables
*****************************************************************************/
-static handler *myisam_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
+static handler *myisam_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
+ MEM_ROOT *mem_root)
{
- return new (mem_root) ha_myisam(table);
+ return new (mem_root) ha_myisam(hton, table);
}
// collect errors printed by mi_check routines
@@ -133,8 +135,8 @@ void mi_check_print_warning(MI_CHECK *param, const char *fmt,...)
}
-ha_myisam::ha_myisam(TABLE_SHARE *table_arg)
- :handler(myisam_hton, table_arg), file(0),
+ha_myisam::ha_myisam(handlerton *hton, TABLE_SHARE *table_arg)
+ :handler(hton, table_arg), file(0),
int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER |
HA_DUPLICATE_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY |
HA_FILE_BASED | HA_CAN_GEOMETRY | HA_NO_TRANSACTIONS |
@@ -1792,11 +1794,11 @@ handlerton *myisam_hton;
static int myisam_init(void *p)
{
myisam_hton= (handlerton *)p;
- myisam_hton->state=SHOW_OPTION_YES;
- myisam_hton->db_type=DB_TYPE_MYISAM;
- myisam_hton->create=myisam_create_handler;
- myisam_hton->panic=mi_panic;
- myisam_hton->flags=HTON_CAN_RECREATE;
+ myisam_hton->state= SHOW_OPTION_YES;
+ myisam_hton->db_type= DB_TYPE_MYISAM;
+ myisam_hton->create= myisam_create_handler;
+ myisam_hton->panic= mi_panic;
+ myisam_hton->flags= HTON_CAN_RECREATE;
return 0;
}
diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h
index 511b796ebdb..85abcdca8b2 100644
--- a/storage/myisam/ha_myisam.h
+++ b/storage/myisam/ha_myisam.h
@@ -43,7 +43,7 @@ class ha_myisam: public handler
int repair(THD *thd, MI_CHECK &param, bool optimize);
public:
- ha_myisam(TABLE_SHARE *table_arg);
+ ha_myisam(handlerton *hton, TABLE_SHARE *table_arg);
~ha_myisam() {}
handler *clone(MEM_ROOT *mem_root);
const char *table_type() const { return "MyISAM"; }
diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc
index bc756e78023..54e5da320b5 100644
--- a/storage/myisammrg/ha_myisammrg.cc
+++ b/storage/myisammrg/ha_myisammrg.cc
@@ -38,15 +38,16 @@ static handler *myisammrg_create_handler(TABLE_SHARE *table,
handlerton *myisammrg_hton;
-static handler *myisammrg_create_handler(TABLE_SHARE *table,
+static handler *myisammrg_create_handler(handlerton *hton,
+ TABLE_SHARE *table,
MEM_ROOT *mem_root)
{
- return new (mem_root) ha_myisammrg(table);
+ return new (mem_root) ha_myisammrg(hton, table);
}
-ha_myisammrg::ha_myisammrg(TABLE_SHARE *table_arg)
- :handler(myisammrg_hton, table_arg), file(0)
+ha_myisammrg::ha_myisammrg(handlerton *hton, TABLE_SHARE *table_arg)
+ :handler(hton, table_arg), file(0)
{}
static const char *ha_myisammrg_exts[] = {
diff --git a/storage/myisammrg/ha_myisammrg.h b/storage/myisammrg/ha_myisammrg.h
index d58a3523c26..faa3ae73c59 100644
--- a/storage/myisammrg/ha_myisammrg.h
+++ b/storage/myisammrg/ha_myisammrg.h
@@ -28,7 +28,7 @@ class ha_myisammrg: public handler
MYRG_INFO *file;
public:
- ha_myisammrg(TABLE_SHARE *table_arg);
+ ha_myisammrg(handlerton *hton, TABLE_SHARE *table_arg);
~ha_myisammrg() {}
const char *table_type() const { return "MRG_MyISAM"; }
const char **bas_ext() const;