summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/ha_innodb.cc22
-rw-r--r--sql/ha_ndbcluster.cc7
-rw-r--r--sql/handler.cc10
-rw-r--r--sql/mysqld.cc18
-rw-r--r--sql/sql_delete.cc3
-rw-r--r--storage/myisam/Makefile.am4
-rw-r--r--storage/myisam/ha_myisam.cc2
7 files changed, 31 insertions, 35 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 00a92e05ffb..41e211dd6d8 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -42,8 +42,6 @@ have disables the InnoDB inlining in this file. */
#define MAX_ULONG_BIT ((ulong) 1 << (sizeof(ulong)*8-1))
-#ifdef WITH_INNOBASE_STORAGE_ENGINE
-
#include "ha_innodb.h"
pthread_mutex_t innobase_share_mutex, /* to protect innobase_open_files */
@@ -311,7 +309,8 @@ SHOW_VAR innodb_status_variables[]= {
(char*) &export_vars.innodb_rows_read, SHOW_LONG},
{"rows_updated",
(char*) &export_vars.innodb_rows_updated, SHOW_LONG},
- {NullS, NullS, SHOW_LONG}};
+ {NullS, NullS, SHOW_LONG}
+};
/* General functions */
@@ -7599,6 +7598,19 @@ bool ha_innobase::check_if_incompatible_data(
return COMPATIBLE_DATA_YES;
}
+static int show_innodb_vars(THD *thd, SHOW_VAR *var, char *buff)
+{
+ innodb_export_status();
+ var->type= SHOW_ARRAY;
+ var->value= (char *) &innodb_status_variables;
+ return 0;
+}
+
+SHOW_VAR innodb_status_variables_export[]= {
+ {"Innodb", (char*) &show_innodb_vars, SHOW_FUNC},
+ {NullS, NullS, SHOW_LONG}
+};
+
struct st_mysql_storage_engine innobase_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, &innobase_hton};
@@ -7612,9 +7624,7 @@ mysql_declare_plugin(innobase)
innobase_init, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,
- 0
+ innodb_status_variables_export
}
mysql_declare_plugin_end;
-#endif
-
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index e8f2ec2af2b..0090f30de19 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -10577,6 +10577,11 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables,
DBUG_RETURN(0);
}
+SHOW_VAR ndb_status_variables_export[]= {
+ {"Ndb", (char*) &ndb_status_variables, SHOW_ARRAY},
+ {NullS, NullS, SHOW_LONG}
+};
+
struct st_mysql_storage_engine ndbcluster_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, &ndbcluster_hton };
@@ -10590,7 +10595,7 @@ mysql_declare_plugin(ndbcluster)
ndbcluster_init, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,
- 0
+ ndb_status_variables_export
}
mysql_declare_plugin_end;
diff --git a/sql/handler.cc b/sql/handler.cc
index aafa6a7d3ca..6fb70d95521 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -37,10 +37,6 @@
#include "ha_partition.h"
#endif
-#ifdef WITH_INNOBASE_STORAGE_ENGINE
-#include "ha_innodb.h"
-#endif
-
/*
While we have legacy_db_type, we have this array to
check for dups and to find handlerton from legacy_db_type.
@@ -434,6 +430,12 @@ int ha_initialize_handlerton(st_plugin_int *plugin)
savepoint_alloc_size+= tmp;
hton->slot= total_ha++;
hton2plugin[hton->slot]=plugin;
+ /* This is just a temp need until plugin/engine startup is fixed */
+ if (plugin->plugin->status_vars)
+ {
+ add_status_vars(plugin->plugin->status_vars);
+ }
+
if (hton->prepare)
total_ha_2pc++;
break;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index ddb5a42d413..7917950529e 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -357,7 +357,6 @@ my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0;
my_bool opt_log_slave_updates= 0;
my_bool opt_innodb;
#ifdef WITH_INNOBASE_STORAGE_ENGINE
-extern SHOW_VAR innodb_status_variables[];
extern uint innobase_init_flags, innobase_lock_type;
extern uint innobase_flush_log_at_trx_commit;
extern ulong innobase_cache_size, innobase_fast_shutdown;
@@ -417,7 +416,6 @@ ulong ndb_report_thresh_binlog_epoch_slip;
ulong ndb_report_thresh_binlog_mem_usage;
#endif
-extern SHOW_VAR ndb_status_variables[];
extern const char *ndb_distribution_names[];
extern TYPELIB ndb_distribution_typelib;
extern const char *opt_ndb_distribution;
@@ -6574,16 +6572,6 @@ static int show_ssl_get_cipher_list(THD *thd, SHOW_VAR *var, char *buff)
#endif /* HAVE_OPENSSL */
-#ifdef WITH_INNOBASE_STORAGE_ENGINE
-int innodb_export_status(void);
-static int show_innodb_vars(THD *thd, SHOW_VAR *var, char *buff)
-{
- innodb_export_status();
- var->type= SHOW_ARRAY;
- var->value= (char *) &innodb_status_variables;
- return 0;
-}
-#endif
SHOW_VAR status_vars[]= {
{"Aborted_clients", (char*) &aborted_threads, SHOW_LONG},
@@ -6723,9 +6711,6 @@ SHOW_VAR status_vars[]= {
{"Handler_savepoint_rollback",(char*) offsetof(STATUS_VAR, ha_savepoint_rollback_count), SHOW_LONG_STATUS},
{"Handler_update", (char*) offsetof(STATUS_VAR, ha_update_count), SHOW_LONG_STATUS},
{"Handler_write", (char*) offsetof(STATUS_VAR, ha_write_count), SHOW_LONG_STATUS},
-#ifdef WITH_INNOBASE_STORAGE_ENGINE
- {"Innodb", (char*) &show_innodb_vars, SHOW_FUNC},
-#endif /* WITH_INNOBASE_STORAGE_ENGINE */
{"Key_blocks_not_flushed", (char*) offsetof(KEY_CACHE, global_blocks_changed), SHOW_KEY_CACHE_LONG},
{"Key_blocks_unused", (char*) offsetof(KEY_CACHE, blocks_unused), SHOW_KEY_CACHE_LONG},
{"Key_blocks_used", (char*) offsetof(KEY_CACHE, blocks_used), SHOW_KEY_CACHE_LONG},
@@ -6735,9 +6720,6 @@ SHOW_VAR status_vars[]= {
{"Key_writes", (char*) offsetof(KEY_CACHE, global_cache_write), SHOW_KEY_CACHE_LONGLONG},
{"Last_query_cost", (char*) offsetof(STATUS_VAR, last_query_cost), SHOW_DOUBLE_STATUS},
{"Max_used_connections", (char*) &max_used_connections, SHOW_LONG},
-#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
- {"Ndb", (char*) &ndb_status_variables, SHOW_ARRAY},
-#endif /* WITH_NDBCLUSTER_STORAGE_ENGINE */
{"Not_flushed_delayed_rows", (char*) &delayed_rows_in_use, SHOW_LONG_NOFLUSH},
{"Open_files", (char*) &my_file_opened, SHOW_LONG_NOFLUSH},
{"Open_streams", (char*) &my_stream_opened, SHOW_LONG_NOFLUSH},
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index df791e1f897..56beea24b87 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -21,9 +21,6 @@
*/
#include "mysql_priv.h"
-#ifdef WITH_INNOBASE_STORAGE_ENGINE
-#include "ha_innodb.h"
-#endif
#include "sql_select.h"
#include "sp_head.h"
#include "sql_trigger.h"
diff --git a/storage/myisam/Makefile.am b/storage/myisam/Makefile.am
index 644fc900c7f..fdccb1f5b19 100644
--- a/storage/myisam/Makefile.am
+++ b/storage/myisam/Makefile.am
@@ -49,7 +49,9 @@ myisampack_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
noinst_PROGRAMS = mi_test1 mi_test2 mi_test3 rt_test sp_test #ft_test1 ft_eval
-noinst_HEADERS = myisamdef.h rt_index.h rt_key.h rt_mbr.h sp_defs.h fulltext.h ftdefs.h ft_test1.h ft_eval.h
+noinst_HEADERS = myisamdef.h rt_index.h rt_key.h rt_mbr.h sp_defs.h \
+ fulltext.h ftdefs.h ft_test1.h ft_eval.h \
+ ha_myisam.h
mi_test1_DEPENDENCIES= $(LIBRARIES)
mi_test1_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
$(top_builddir)/mysys/libmysys.a \
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 6ebf4717740..209478ee9a5 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -29,8 +29,6 @@
#include "myisamdef.h"
#include "rt_index.h"
-#include <mysql/plugin.h>
-
ulong myisam_recover_options= HA_RECOVER_NONE;
/* bits in myisam_recover_options */