summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2006-08-25 14:07:30 -0700
committerunknown <brian@zim.(none)>2006-08-25 14:07:30 -0700
commite454fb0c9dd768ff7198d177253d9e6fe95511b2 (patch)
treef2bea38f12b4ec4b52b8886dacb59249b306d9f7
parent43dbfa66c5cf2c777af7c70eb121c4749e9a30aa (diff)
parent9f9c3364cb71928633a120bf5548f358274f9da2 (diff)
downloadmariadb-git-e454fb0c9dd768ff7198d177253d9e6fe95511b2.tar.gz
Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1
into zim.(none):/home/brian/mysql/arch-5.1 BUILD/compile-alpha-cxx: Auto merged BUILD/compile-alpha-debug: Auto merged BUILD/compile-dist: Auto merged BUILD/compile-ia64-debug-max: Auto merged CMakeLists.txt: Auto merged client/mysql.cc: Auto merged sql/handler.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_plugin.cc: Auto merged storage/csv/ha_tina.cc: Auto merged BUILD/FINISH.sh: Innodbase config still needed.
-rwxr-xr-xBUILD/autorun.sh5
-rw-r--r--CMakeLists.txt3
-rw-r--r--client/mysql.cc1
-rw-r--r--configure.in50
-rw-r--r--libmysqld/CMakeLists.txt6
-rw-r--r--libmysqld/Makefile.am3
-rw-r--r--server-tools/instance-manager/parse.cc2
-rw-r--r--sql/CMakeLists.txt9
-rw-r--r--sql/Makefile.am6
-rw-r--r--sql/field.cc5
-rw-r--r--sql/filesort.cc1
-rw-r--r--sql/ha_innodb.cc23
-rw-r--r--sql/ha_innodb.h6
-rw-r--r--sql/ha_ndbcluster.cc8
-rw-r--r--sql/ha_partition.cc2
-rw-r--r--sql/handler.cc46
-rw-r--r--sql/handler.h3
-rw-r--r--sql/mysqld.cc29
-rw-r--r--sql/partition_element.h4
-rw-r--r--sql/sql_cache.cc6
-rw-r--r--sql/sql_delete.cc3
-rw-r--r--sql/sql_plugin.cc2
-rw-r--r--storage/archive/CMakeLists.txt1
-rw-r--r--storage/blackhole/CMakeLists.txt1
-rw-r--r--storage/blackhole/plug.in6
-rw-r--r--storage/csv/CMakeLists.txt1
-rw-r--r--storage/csv/ha_tina.cc1
-rw-r--r--storage/csv/plug.in5
-rw-r--r--storage/example/CMakeLists.txt1
-rw-r--r--storage/example/ha_example.cc1
-rw-r--r--storage/federated/CMakeLists.txt7
-rw-r--r--storage/federated/Makefile.am52
-rw-r--r--storage/federated/ha_federated.cc (renamed from sql/ha_federated.cc)5
-rw-r--r--storage/federated/ha_federated.h (renamed from sql/ha_federated.h)0
-rw-r--r--storage/federated/plug.in4
-rw-r--r--storage/heap/CMakeLists.txt6
-rw-r--r--storage/heap/Makefile.am32
-rw-r--r--storage/heap/ha_heap.cc (renamed from sql/ha_heap.cc)3
-rw-r--r--storage/heap/ha_heap.h (renamed from sql/ha_heap.h)0
-rw-r--r--storage/heap/plug.in6
-rw-r--r--storage/innobase/Makefile.am12
-rw-r--r--storage/innobase/configure.in156
-rw-r--r--storage/innobase/include/Makefile.i6
-rw-r--r--storage/innobase/include/univ.i2
-rw-r--r--storage/innobase/plug.in70
-rw-r--r--storage/myisam/CMakeLists.txt6
-rw-r--r--storage/myisam/Makefile.am61
-rw-r--r--storage/myisam/ha_myisam.cc (renamed from sql/ha_myisam.cc)12
-rw-r--r--storage/myisam/ha_myisam.h (renamed from sql/ha_myisam.h)0
-rw-r--r--storage/myisam/plug.in6
-rw-r--r--storage/myisammrg/CMakeLists.txt6
-rw-r--r--storage/myisammrg/Makefile.am20
-rw-r--r--storage/myisammrg/ha_myisammrg.cc (renamed from sql/ha_myisammrg.cc)9
-rw-r--r--storage/myisammrg/ha_myisammrg.h (renamed from sql/ha_myisammrg.h)0
-rw-r--r--storage/myisammrg/plug.in5
-rw-r--r--storage/ndb/plug.in6
56 files changed, 400 insertions, 332 deletions
diff --git a/BUILD/autorun.sh b/BUILD/autorun.sh
index 9ffe61b250a..def229e21a0 100755
--- a/BUILD/autorun.sh
+++ b/BUILD/autorun.sh
@@ -11,11 +11,6 @@ if [ -f /usr/bin/glibtoolize ]
LIBTOOLIZE=libtoolize
fi
-(cd storage/bdb/dist && sh s_all)
-(cd storage/innobase && aclocal && autoheader && \
- $LIBTOOLIZE --automake --force --copy && \
- automake --force --add-missing --copy && autoconf)
-
aclocal || die "Can't execute aclocal"
autoheader || die "Can't execute autoheader"
# --force means overwrite ltmain.sh script if it already exists
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30742d444ab..9814b80793c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,6 +136,9 @@ ENDIF(WITH_CSV_STORAGE_ENGINE)
IF(WITH_EXAMPLE_STORAGE_ENGINE)
ADD_SUBDIRECTORY(storage/example)
ENDIF(WITH_EXAMPLE_STORAGE_ENGINE)
+IF(WITH_FEDERATED_STORAGE_ENGINE)
+ ADD_SUBDIRECTORY(storage/federated)
+ENDIF(WITH_FEDERATED_STORAGE_ENGINE)
IF(WITH_INNOBASE_STORAGE_ENGINE)
ADD_SUBDIRECTORY(storage/innobase)
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
diff --git a/client/mysql.cc b/client/mysql.cc
index 42723b55a29..ae24c4e0d88 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2384,7 +2384,6 @@ print_table_data(MYSQL_RES *result)
const char *buffer;
uint data_length;
uint field_max_length;
- bool right_justified;
uint visible_length;
uint extra_padding;
diff --git a/configure.in b/configure.in
index 4b1141006b5..46d27beade3 100644
--- a/configure.in
+++ b/configure.in
@@ -2140,65 +2140,15 @@ MYSQL_CHECK_SSL
# Has to be done late, as the plugin may need to check for existence of
# functions tested above
#--------------------------------------------------------------------
-
-MYSQL_STORAGE_ENGINE(blackhole,,[Blackhole Storage Engine],
- [Basic Write-only Read-never tables], [max,max-no-ndb])
-MYSQL_PLUGIN_DIRECTORY(blackhole, [storage/blackhole])
-MYSQL_PLUGIN_STATIC(blackhole, [libblackhole.a])
-MYSQL_PLUGIN_DYNAMIC(blackhole, [ha_blackhole.la])
-
-MYSQL_STORAGE_ENGINE(csv,, [CSV Storage Engine],
- [Stores tables in text CSV format])
-MYSQL_PLUGIN_DIRECTORY(csv, [storage/csv])
-MYSQL_PLUGIN_STATIC(csv, [libcsv.a])
-MYSQL_PLUGIN_MANDATORY(csv) dnl Used for logging
-
-MYSQL_STORAGE_ENGINE(federated,,[Federated Storage Engine],
- [Connects to tables on remote MySQL servers], [max,max-no-ndb])
-
MYSQL_PLUGIN(ftexample, [Simple Parser],
[Simple full-text parser plugin])
MYSQL_PLUGIN_DIRECTORY(ftexample, [plugin/fulltext])
MYSQL_PLUGIN_DYNAMIC(ftexample, [mypluglib.la])
-MYSQL_STORAGE_ENGINE(heap,no, [Memory Storage Engine],
- [Volatile memory based tables])
-MYSQL_PLUGIN_DIRECTORY(heap, [storage/heap])
-MYSQL_PLUGIN_STATIC(heap, [libheap.a])
-MYSQL_PLUGIN_MANDATORY(heap) dnl Memory tables
-
-MYSQL_STORAGE_ENGINE(innobase, innodb, [InnoDB Storage Engine],
- [Transactional Tables using InnoDB], [max,max-no-ndb])
-MYSQL_PLUGIN_DIRECTORY(innobase, [storage/innobase])
-MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a])
-MYSQL_PLUGIN_ACTIONS(innobase, [
- AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
- AC_SUBST(innodb_system_libs)
-])
-
-MYSQL_STORAGE_ENGINE(myisam,no, [MyISAM Storage Engine],
- [Traditional non-transactional MySQL tables])
-MYSQL_PLUGIN_DIRECTORY(myisam, [storage/myisam])
-MYSQL_PLUGIN_STATIC(myisam, [libmyisam.a])
-MYSQL_PLUGIN_MANDATORY(myisam) dnl Default
-
-MYSQL_STORAGE_ENGINE(myisammrg,no,[MyISAM MERGE Engine],
- [Merge multiple MySQL tables into one])
-MYSQL_PLUGIN_DIRECTORY(myisammrg,[storage/myisammrg])
-MYSQL_PLUGIN_STATIC(myisammrg, [libmyisammrg.a])
-MYSQL_PLUGIN_MANDATORY(myisammrg)
-
-MYSQL_STORAGE_ENGINE(ndbcluster, ndbcluster, [Cluster Storage Engine],
- [High Availability Clustered tables], [max])
-MYSQL_PLUGIN_DIRECTORY(ndbcluster,[storage/ndb])
-MYSQL_PLUGIN_STATIC(ndbcluster, [[\$(ndbcluster_libs) \$(ndbcluster_system_libs) \$(NDB_SCI_LIBS)]])
-MYSQL_PLUGIN_ACTIONS(ndbcluster,[MYSQL_SETUP_NDBCLUSTER])
-
MYSQL_STORAGE_ENGINE(partition, partition, [Partition Support],
[MySQL Partitioning Support], [max,max-no-ndb])
dnl -- ndbcluster requires partition to be enabled
-MYSQL_PLUGIN_DEPENDS(ndbcluster, [partition])
MYSQL_CONFIGURE_PLUGINS([none])
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index 804ab4ad3f2..d752d905568 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -30,8 +30,7 @@ ADD_LIBRARY(mysqldemb emb_qcache.cc libmysqld.c lib_sql.cc
../sql-common/pack.c ../sql/derror.cc ../sql/event_scheduler.cc
../sql/event_timed.cc ../sql/events.cc ../sql/discover.cc
../sql/field_conv.cc ../sql/field.cc ../sql/filesort.cc
- ../sql/gstream.cc ../sql/ha_heap.cc ../sql/ha_myisam.cc
- ../sql/ha_myisammrg.cc ${mysql_se_ha_src}
+ ../sql/gstream.cc ${mysql_se_ha_src}
../sql/handler.cc ../sql/hash_filo.cc
../sql/hostname.cc ../sql/init.cc ../sql/item_buff.cc
../sql/item_cmpfunc.cc ../sql/item.cc ../sql/item_create.cc
@@ -80,6 +79,9 @@ ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)
IF(WITH_EXAMPLE_STORAGE_ENGINE)
ADD_DEPENDENCIES(mysqlserver example)
ENDIF(WITH_EXAMPLE_STORAGE_ENGINE)
+IF(WITH_FEDERATED_STORAGE_ENGINE)
+ ADD_DEPENDENCIES(mysqlserver federated)
+ENDIF(WITH_FEDERATED_STORAGE_ENGINE)
IF(WITH_INNOBASE_STORAGE_ENGINE)
ADD_DEPENDENCIES(mysqlserver innobase)
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
index 9e85c46575d..e6d1c1acfca 100644
--- a/libmysqld/Makefile.am
+++ b/libmysqld/Makefile.am
@@ -44,8 +44,7 @@ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
noinst_HEADERS = embedded_priv.h emb_qcache.h
sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
- ha_heap.cc ha_myisam.cc ha_myisammrg.cc \
- ha_innodb.cc ha_federated.cc ha_ndbcluster.cc \
+ ha_innodb.cc ha_ndbcluster.cc \
ha_ndbcluster_binlog.cc ha_partition.cc \
handler.cc sql_handler.cc \
hostname.cc init.cc password.c \
diff --git a/server-tools/instance-manager/parse.cc b/server-tools/instance-manager/parse.cc
index 4e931488fce..d69fb1cecec 100644
--- a/server-tools/instance-manager/parse.cc
+++ b/server-tools/instance-manager/parse.cc
@@ -152,7 +152,7 @@ static bool parse_long(const LEX_STRING *token, long *value)
int err_code;
char *end_ptr= token->str + token->length;
- *value= my_strtoll10(token->str, &end_ptr, &err_code);
+ *value= (long)my_strtoll10(token->str, &end_ptr, &err_code);
return err_code != 0;
}
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 4d0c0cf3207..132362c43d1 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -27,15 +27,15 @@ ADD_DEFINITIONS(-DHAVE_ROW_BASED_REPLICATION -DMYSQL_SERVER
ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc
discover.cc ../libmysql/errmsg.c field.cc field_conv.cc
- filesort.cc gstream.cc ha_heap.cc ha_myisam.cc ha_myisammrg.cc
- ha_innodb.cc ha_partition.cc ha_federated.cc
+ filesort.cc gstream.cc
+ ha_innodb.cc ha_partition.cc
handler.cc hash_filo.cc hash_filo.h
hostname.cc init.cc item.cc item_buff.cc item_cmpfunc.cc
item_create.cc item_func.cc item_geofunc.cc item_row.cc
item_strfunc.cc item_subselect.cc item_sum.cc item_timefunc.cc
item_uniq.cc key.cc log.cc lock.cc log_event.cc message.rc
message.h mf_iocache.cc my_decimal.cc ../sql-common/my_time.c
- ../storage/myisammrg/myrg_rnext_same.c mysqld.cc net_serv.cc
+ mysqld.cc net_serv.cc
nt_servc.cc nt_servc.h opt_range.cc opt_range.h opt_sum.cc
../sql-common/pack.c parse_file.cc password.c procedure.cc
protocol.cc records.cc repl_failsafe.cc rpl_filter.cc set_var.cc
@@ -75,6 +75,9 @@ ENDIF(WITH_CSV_STORAGE_ENGINE)
IF(WITH_EXAMPLE_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(mysqld example)
ENDIF(WITH_EXAMPLE_STORAGE_ENGINE)
+IF(WITH_FEDERATED_STORAGE_ENGINE)
+ TARGET_LINK_LIBRARIES(mysqld federated)
+ENDIF(WITH_FEDERATED_STORAGE_ENGINE)
IF(WITH_INNOBASE_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(mysqld innobase)
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
diff --git a/sql/Makefile.am b/sql/Makefile.am
index 5c509707f51..7470abfeb34 100644
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -49,8 +49,8 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
procedure.h sql_class.h sql_lex.h sql_list.h \
sql_map.h sql_string.h unireg.h \
sql_error.h field.h handler.h mysqld_suffix.h \
- ha_heap.h ha_myisam.h ha_myisammrg.h ha_partition.h \
- ha_innodb.h ha_federated.h \
+ ha_partition.h \
+ ha_innodb.h \
ha_ndbcluster.h ha_ndbcluster_binlog.h \
ha_ndbcluster_tables.h \
opt_range.h protocol.h rpl_tblmap.h \
@@ -87,9 +87,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
unireg.cc des_key_file.cc \
discover.cc time.cc opt_range.cc opt_sum.cc \
records.cc filesort.cc handler.cc \
- ha_heap.cc ha_myisam.cc ha_myisammrg.cc \
ha_partition.cc ha_innodb.cc \
- ha_federated.cc \
ha_ndbcluster.cc ha_ndbcluster_binlog.cc \
sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \
sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \
diff --git a/sql/field.cc b/sql/field.cc
index 8ac32f03049..f2fe9d38917 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -9145,10 +9145,9 @@ create_field::create_field(Field *old_field,Field *orig_field)
old_field->table->timestamp_field != old_field || /* timestamp field */
unireg_check == Field::TIMESTAMP_UN_FIELD)) /* has default val */
{
- char buff[MAX_FIELD_WIDTH],*pos;
- String tmp(buff,sizeof(buff), charset), *res;
+ char buff[MAX_FIELD_WIDTH];
+ String tmp(buff,sizeof(buff), charset);
my_ptrdiff_t diff;
- bool is_null;
/* Get the value from default_values */
diff= (my_ptrdiff_t) (orig_field->table->s->default_values-
diff --git a/sql/filesort.cc b/sql/filesort.cc
index f41d72ac07a..1851d5a5cff 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -886,7 +886,6 @@ static void make_sortkey(register SORTPARAM *param,
static void register_used_fields(SORTPARAM *param)
{
reg1 SORT_FIELD *sort_field;
- reg5 uint length;
TABLE *table=param->sort_form;
MY_BITMAP *bitmap= table->read_set;
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 00a92e05ffb..7f4d6abd4b7 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 */
@@ -2916,7 +2915,6 @@ ha_innobase::store_key_val_for_row(
CHARSET_INFO* cs;
ulint key_len;
- ulint len;
ulint true_len;
int error=0;
ulint blob_len;
@@ -7599,6 +7597,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 +7623,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_innodb.h b/sql/ha_innodb.h
index ba8560f717f..4d5dc6b52d6 100644
--- a/sql/ha_innodb.h
+++ b/sql/ha_innodb.h
@@ -227,12 +227,6 @@ extern my_bool innobase_log_archive,
innobase_use_native_aio,
innobase_file_per_table, innobase_locks_unsafe_for_binlog,
innobase_create_status_file;
-extern my_bool innobase_very_fast_shutdown; /* set this to 1 just before
- calling innobase_end() if
- you want InnoDB to shut down
- without flushing the buffer
- pool: this is equivalent to
- a 'crash' */
extern "C" {
extern ulong srv_max_buf_pool_modified_pct;
extern ulong srv_max_purge_lag;
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index e8f2ec2af2b..c7b0ce95214 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -6387,6 +6387,7 @@ static int ndbcluster_init()
ndbcluster_binlog_init_handlerton();
#endif
h.flags= HTON_CAN_RECREATE | HTON_TEMPORARY_NOT_SUPPORTED;
+ h.discover= ndbcluster_discover;
}
if (have_ndbcluster != SHOW_OPTION_YES)
@@ -10577,6 +10578,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 +10596,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/ha_partition.cc b/sql/ha_partition.cc
index 615c4bfb1bf..ee0667b92bd 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -361,7 +361,7 @@ bool ha_partition::initialise_partition(MEM_ROOT *mem_root)
HA_CAN_GEOMETRY, HA_CAN_FULLTEXT, HA_CAN_SQL_HANDLER, HA_DUPLICATE_POS,
HA_CAN_INSERT_DELAYED is disabled until further investigated.
*/
- m_table_flags= m_file[0]->table_flags();
+ m_table_flags= (ulong)m_file[0]->table_flags();
m_low_byte_first= m_file[0]->low_byte_first();
m_pkey_is_clustered= TRUE;
file_array= m_file;
diff --git a/sql/handler.cc b/sql/handler.cc
index cb0f6ee323f..dd1be47e3c2 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -23,9 +23,6 @@
#include "mysql_priv.h"
#include "rpl_filter.h"
-#include "ha_heap.h"
-#include "ha_myisam.h"
-#include "ha_myisammrg.h"
#include <myisampack.h>
@@ -40,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.
@@ -437,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;
@@ -2706,18 +2705,41 @@ int ha_change_key_cache(KEY_CACHE *old_key_cache,
>0 : error. frmblob and frmlen may not be set
*/
+typedef struct st_discover_args
+{
+ const char *db;
+ const char *name;
+ const void** frmblob;
+ uint* frmlen;
+};
+
+static my_bool discover_handlerton(THD *thd, st_plugin_int *plugin,
+ void *arg)
+{
+ st_discover_args *vargs= (st_discover_args *)arg;
+ handlerton *hton= (handlerton *)plugin->data;
+ if (hton->state == SHOW_OPTION_YES && hton->discover &&
+ (!(hton->discover(thd, vargs->db, vargs->name, vargs->frmblob, vargs->frmlen))))
+ return TRUE;
+
+ return FALSE;
+}
+
int ha_discover(THD *thd, const char *db, const char *name,
const void **frmblob, uint *frmlen)
{
int error= -1; // Table does not exist in any handler
DBUG_ENTER("ha_discover");
DBUG_PRINT("enter", ("db: %s, name: %s", db, name));
+ st_discover_args args= {db, name, frmblob, frmlen};
+
if (is_prefix(name,tmp_file_prefix)) /* skip temporary tables */
DBUG_RETURN(error);
-#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
- if (have_ndbcluster == SHOW_OPTION_YES)
- error= ndbcluster_discover(thd, db, name, frmblob, frmlen);
-#endif
+
+ if (plugin_foreach(thd, discover_handlerton,
+ MYSQL_STORAGE_ENGINE_PLUGIN, &args))
+ error= 0;
+
if (!error)
statistic_increment(thd->status_var.ha_discover_count,&LOCK_status);
DBUG_RETURN(error);
@@ -3516,7 +3538,7 @@ int handler::ha_reset()
/* Check that we have called all proper delallocation functions */
DBUG_ASSERT((byte*) table->def_read_set.bitmap +
table->s->column_bitmap_size ==
- (char*) table->def_write_set.bitmap);
+ (byte*) table->def_write_set.bitmap);
DBUG_ASSERT(bitmap_is_set_all(&table->s->all_set));
DBUG_ASSERT(table->key_read == 0);
/* ensure that ha_index_end / ha_rnd_end has been called */
diff --git a/sql/handler.h b/sql/handler.h
index 201a2f1980a..bfc502b0658 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -667,6 +667,8 @@ struct handlerton
enum handler_create_iterator_result
(*create_iterator)(enum handler_iterator_type type,
struct handler_iterator *fill_this_in);
+ int (*discover)(THD* thd, const char *db, const char *name,
+ const void** frmblob, uint* frmlen);
};
@@ -1589,7 +1591,6 @@ private:
/* Some extern variables used with handlers */
-extern handlerton *sys_table_types[];
extern const char *ha_row_type[];
extern TYPELIB tx_isolation_typelib;
extern TYPELIB myisam_stats_method_typelib;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 419ea27b941..46f5e0ae4e9 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -26,7 +26,7 @@
#include "mysys_err.h"
#include "events.h"
-#include "ha_myisam.h"
+#include "../storage/myisam/ha_myisam.h"
#ifdef HAVE_ROW_BASED_REPLICATION
#include "rpl_injector.h"
@@ -357,10 +357,7 @@ 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;
+extern ulong innobase_fast_shutdown;
extern ulong innobase_large_page_size;
extern char *innobase_home, *innobase_tmpdir, *innobase_logdir;
extern long innobase_lock_scan_time;
@@ -384,11 +381,6 @@ extern my_bool innobase_log_archive,
innobase_use_native_aio,
innobase_file_per_table, innobase_locks_unsafe_for_binlog,
innobase_create_status_file;
-extern my_bool innobase_very_fast_shutdown; /* set this to 1 just before
- calling innobase_end() if you want
- InnoDB to shut down without
- flushing the buffer pool: this
- is equivalent to a 'crash' */
extern "C" {
extern ulong srv_max_buf_pool_modified_pct;
extern ulong srv_max_purge_lag;
@@ -417,7 +409,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 +6565,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 +6704,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 +6713,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/partition_element.h b/sql/partition_element.h
index 5ca278997ae..1e2769bc21a 100644
--- a/sql/partition_element.h
+++ b/sql/partition_element.h
@@ -56,8 +56,8 @@ class partition_element :public Sql_alloc {
public:
List<partition_element> subpartitions;
List<part_elem_value> list_val_list;
- ulonglong part_max_rows;
- ulonglong part_min_rows;
+ ha_rows part_max_rows;
+ ha_rows part_min_rows;
longlong range_value;
char *partition_name;
char *tablespace_name;
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index e73dd4b1d09..1d35bfd59ad 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -299,12 +299,8 @@ TODO list:
#include <m_ctype.h>
#include <my_dir.h>
#include <hash.h>
-#include "ha_myisammrg.h"
-#ifndef MASTER
-#include "../srclib/myisammrg/myrg_def.h"
-#else
+#include "../storage/myisammrg/ha_myisammrg.h"
#include "../storage/myisammrg/myrg_def.h"
-#endif
#ifdef EMBEDDED_LIBRARY
#include "emb_qcache.h"
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/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 8dc00908fc5..074999a52cf 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -927,7 +927,7 @@ my_bool plugin_foreach(THD *thd, plugin_foreach_func *func,
{
uint idx;
struct st_plugin_int *plugin;
- DBUG_ENTER("mysql_uninstall_plugin");
+ DBUG_ENTER("plugin_foreach");
rw_rdlock(&THR_LOCK_plugin);
if (type == MYSQL_ANY_PLUGIN)
diff --git a/storage/archive/CMakeLists.txt b/storage/archive/CMakeLists.txt
index a631f194b1a..127942d4043 100644
--- a/storage/archive/CMakeLists.txt
+++ b/storage/archive/CMakeLists.txt
@@ -3,6 +3,7 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/sql
+ ${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
ADD_LIBRARY(archive azio.c ha_archive.cc ha_archive.h)
TARGET_LINK_LIBRARIES(archive zlib mysys dbug strings)
diff --git a/storage/blackhole/CMakeLists.txt b/storage/blackhole/CMakeLists.txt
index ea3a7eae38e..a90f8e14ca0 100644
--- a/storage/blackhole/CMakeLists.txt
+++ b/storage/blackhole/CMakeLists.txt
@@ -2,5 +2,6 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql
+ ${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
ADD_LIBRARY(blackhole ha_blackhole.cc ha_blackhole.h)
diff --git a/storage/blackhole/plug.in b/storage/blackhole/plug.in
new file mode 100644
index 00000000000..725db0facba
--- /dev/null
+++ b/storage/blackhole/plug.in
@@ -0,0 +1,6 @@
+MYSQL_STORAGE_ENGINE(blackhole,,[Blackhole Storage Engine],
+ [Basic Write-only Read-never tables], [max,max-no-ndb])
+MYSQL_PLUGIN_DIRECTORY(blackhole, [storage/blackhole])
+MYSQL_PLUGIN_STATIC(blackhole, [libblackhole.a])
+MYSQL_PLUGIN_DYNAMIC(blackhole, [ha_blackhole.la])
+
diff --git a/storage/csv/CMakeLists.txt b/storage/csv/CMakeLists.txt
index 28748527cc3..55e9b50fbfc 100644
--- a/storage/csv/CMakeLists.txt
+++ b/storage/csv/CMakeLists.txt
@@ -2,5 +2,6 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql
+ ${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
ADD_LIBRARY(csv ha_tina.cc ha_tina.h)
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 5d18ed99a9a..2fe2afeb470 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -157,6 +157,7 @@ static int tina_init_func()
VOID(pthread_mutex_init(&tina_mutex,MY_MUTEX_INIT_FAST));
(void) hash_init(&tina_open_tables,system_charset_info,32,0,0,
(hash_get_key) tina_get_key,0,0);
+ bzero(&tina_hton, sizeof(handlerton));
tina_hton.state= SHOW_OPTION_YES;
tina_hton.db_type= DB_TYPE_CSV_DB;
tina_hton.create= tina_create_handler;
diff --git a/storage/csv/plug.in b/storage/csv/plug.in
new file mode 100644
index 00000000000..bbc69680fcd
--- /dev/null
+++ b/storage/csv/plug.in
@@ -0,0 +1,5 @@
+MYSQL_STORAGE_ENGINE(csv,, [CSV Storage Engine],
+ [Stores tables in text CSV format])
+MYSQL_PLUGIN_DIRECTORY(csv, [storage/csv])
+MYSQL_PLUGIN_STATIC(csv, [libcsv.a])
+MYSQL_PLUGIN_MANDATORY(csv) dnl Used for logging
diff --git a/storage/example/CMakeLists.txt b/storage/example/CMakeLists.txt
index f4579aa0c66..384631a66c4 100644
--- a/storage/example/CMakeLists.txt
+++ b/storage/example/CMakeLists.txt
@@ -2,5 +2,6 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql
+ ${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
ADD_LIBRARY(example ha_example.cc)
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc
index feabad2e356..704ea757749 100644
--- a/storage/example/ha_example.cc
+++ b/storage/example/ha_example.cc
@@ -67,6 +67,7 @@
#pragma implementation // gcc: Class implementation
#endif
+#define MYSQL_SERVER 1
#include "mysql_priv.h"
#include "ha_example.h"
diff --git a/storage/federated/CMakeLists.txt b/storage/federated/CMakeLists.txt
new file mode 100644
index 00000000000..97a4f318a11
--- /dev/null
+++ b/storage/federated/CMakeLists.txt
@@ -0,0 +1,7 @@
+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
+SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql
+ ${CMAKE_SOURCE_DIR}/regex
+ ${CMAKE_SOURCE_DIR}/extra/yassl/include)
+ADD_LIBRARY(federated ha_federated.cc)
diff --git a/storage/federated/Makefile.am b/storage/federated/Makefile.am
new file mode 100644
index 00000000000..813455ed5c7
--- /dev/null
+++ b/storage/federated/Makefile.am
@@ -0,0 +1,52 @@
+# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+#called from the top level Makefile
+
+MYSQLDATAdir = $(localstatedir)
+MYSQLSHAREdir = $(pkgdatadir)
+MYSQLBASEdir= $(prefix)
+MYSQLLIBdir= $(pkglibdir)
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \
+ -I$(top_srcdir)/regex \
+ -I$(top_srcdir)/sql \
+ -I$(srcdir)
+WRAPLIBS=
+
+LDADD =
+
+DEFS = @DEFS@
+
+noinst_HEADERS = ha_federated.h
+
+EXTRA_LTLIBRARIES = ha_federated.la
+pkglib_LTLIBRARIES = @plugin_federated_shared_target@
+ha_federated_la_LDFLAGS = -module -rpath $(MYSQLLIBdir)
+ha_federated_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
+ha_federated_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
+ha_federated_la_SOURCES = ha_federated.cc
+
+
+EXTRA_LIBRARIES = libfederated.a
+noinst_LIBRARIES = @plugin_federated_static_target@
+libfederated_a_CXXFLAGS = $(AM_CFLAGS)
+libfederated_a_CFLAGS = $(AM_CFLAGS)
+libfederated_a_SOURCES= ha_federated.cc
+
+
+EXTRA_DIST = CMakeLists.txt
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/sql/ha_federated.cc b/storage/federated/ha_federated.cc
index fbb3cbd9646..98f48b09ba6 100644
--- a/sql/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -333,12 +333,14 @@
*/
+#define MYSQL_SERVER 1
#include "mysql_priv.h"
+#include <mysql/plugin.h>
+
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
#endif
-#ifdef WITH_FEDERATED_STORAGE_ENGINE
#include "ha_federated.h"
#include "m_string.h"
@@ -2898,4 +2900,3 @@ mysql_declare_plugin(federated)
}
mysql_declare_plugin_end;
-#endif
diff --git a/sql/ha_federated.h b/storage/federated/ha_federated.h
index ebdc775d3bf..ebdc775d3bf 100644
--- a/sql/ha_federated.h
+++ b/storage/federated/ha_federated.h
diff --git a/storage/federated/plug.in b/storage/federated/plug.in
new file mode 100644
index 00000000000..81c56cb672f
--- /dev/null
+++ b/storage/federated/plug.in
@@ -0,0 +1,4 @@
+MYSQL_STORAGE_ENGINE(federated,,[Federated Storage Engine],
+ [Connects to tables on remote MySQL servers], [max,max-no-ndb])
+MYSQL_PLUGIN_STATIC(federated, [libfederated.a])
+MYSQL_PLUGIN_DYNAMIC(federated, [ha_federated.la])
diff --git a/storage/heap/CMakeLists.txt b/storage/heap/CMakeLists.txt
index db5fb8b2981..720bd7228f5 100644
--- a/storage/heap/CMakeLists.txt
+++ b/storage/heap/CMakeLists.txt
@@ -1,8 +1,12 @@
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
+ ${CMAKE_SOURCE_DIR}/sql
+ ${CMAKE_SOURCE_DIR}/regex
+ ${CMAKE_SOURCE_DIR}/extra/yassl/include)
ADD_LIBRARY(heap _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create.c
+ ha_heap.cc
hp_delete.c hp_extra.c hp_hash.c hp_info.c hp_open.c hp_panic.c
hp_rename.c hp_rfirst.c hp_rkey.c hp_rlast.c hp_rnext.c hp_rprev.c
hp_rrnd.c hp_rsame.c hp_scan.c hp_static.c hp_update.c hp_write.c)
diff --git a/storage/heap/Makefile.am b/storage/heap/Makefile.am
index 68dce9bca5f..46565126b65 100644
--- a/storage/heap/Makefile.am
+++ b/storage/heap/Makefile.am
@@ -14,22 +14,42 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
-LDADD = libheap.a \
- $(top_builddir)/mysys/libmysys.a \
- $(top_builddir)/dbug/libdbug.a \
- $(top_builddir)/strings/libmystrings.a
+MYSQLDATAdir = $(localstatedir)
+MYSQLSHAREdir = $(pkgdatadir)
+MYSQLBASEdir= $(prefix)
+MYSQLLIBdir= $(pkglibdir)
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \
+ -I$(top_srcdir)/regex \
+ -I$(top_srcdir)/sql \
+ -I$(srcdir)
+WRAPLIBS=
+
+LDADD =
+
+DEFS = @DEFS@
pkglib_LIBRARIES = libheap.a
noinst_PROGRAMS = hp_test1 hp_test2
+noinst_LIBRARIES = libheap.a
hp_test1_LDFLAGS = @NOINST_LDFLAGS@
+hp_test1_LDADD = libheap.a \
+ $(top_builddir)/mysys/libmysys.a \
+ $(top_builddir)/dbug/libdbug.a \
+ $(top_builddir)/strings/libmystrings.a
hp_test2_LDFLAGS = @NOINST_LDFLAGS@
-noinst_HEADERS = heapdef.h
+hp_test2_LDADD = libheap.a \
+ $(top_builddir)/mysys/libmysys.a \
+ $(top_builddir)/dbug/libdbug.a \
+ $(top_builddir)/strings/libmystrings.a
+noinst_HEADERS = heapdef.h ha_heap.h
libheap_a_SOURCES = hp_open.c hp_extra.c hp_close.c hp_panic.c hp_info.c \
hp_rrnd.c hp_scan.c hp_update.c hp_write.c hp_delete.c \
hp_rsame.c hp_create.c hp_rename.c hp_rfirst.c \
hp_rnext.c hp_rlast.c hp_rprev.c hp_clear.c \
hp_rkey.c hp_block.c \
+ ha_heap.cc \
hp_hash.c _check.c _rectest.c hp_static.c
+
+
EXTRA_DIST = CMakeLists.txt
# Don't update the files from bitkeeper
diff --git a/sql/ha_heap.cc b/storage/heap/ha_heap.cc
index 3a2027afaba..317f85d26f2 100644
--- a/sql/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -19,8 +19,9 @@
#pragma implementation // gcc: Class implementation
#endif
+#define MYSQL_SERVER 1
#include "mysql_priv.h"
-#include <myisampack.h>
+#include <mysql/plugin.h>
#include "ha_heap.h"
diff --git a/sql/ha_heap.h b/storage/heap/ha_heap.h
index 00e59856f26..00e59856f26 100644
--- a/sql/ha_heap.h
+++ b/storage/heap/ha_heap.h
diff --git a/storage/heap/plug.in b/storage/heap/plug.in
new file mode 100644
index 00000000000..9e744b6ac0d
--- /dev/null
+++ b/storage/heap/plug.in
@@ -0,0 +1,6 @@
+MYSQL_STORAGE_ENGINE(heap,no, [Memory Storage Engine],
+ [Volatile memory based tables])
+MYSQL_PLUGIN_DIRECTORY(heap, [storage/heap])
+MYSQL_PLUGIN_STATIC(heap, [libheap.a])
+MYSQL_PLUGIN_MANDATORY(heap) dnl Memory tables
+
diff --git a/storage/innobase/Makefile.am b/storage/innobase/Makefile.am
index 7884715d839..a68dbbcc2e6 100644
--- a/storage/innobase/Makefile.am
+++ b/storage/innobase/Makefile.am
@@ -17,10 +17,20 @@
# Process this file with automake to create Makefile.in
+MYSQLDATAdir = $(localstatedir)
+MYSQLSHAREdir = $(pkgdatadir)
+MYSQLBASEdir= $(prefix)
+MYSQLLIBdir= $(pkglibdir)
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \
+ -I$(top_srcdir)/regex \
+ -I$(top_srcdir)/storage/innobase/include \
+ -I$(top_srcdir)/sql \
+ -I$(srcdir)
+
AUTOMAKE_OPTIONS = foreign
TAR = gtar
-noinst_HEADERS = ib_config.h
+noinst_HEADERS =
SUBDIRS = os ut btr buf data dict dyn eval fil fsp fut \
ha ibuf lock log mach mem mtr page \
diff --git a/storage/innobase/configure.in b/storage/innobase/configure.in
deleted file mode 100644
index 4aaa28da89e..00000000000
--- a/storage/innobase/configure.in
+++ /dev/null
@@ -1,156 +0,0 @@
-# Process this file with autoconf to produce a configure script
-AC_INIT
-AC_CANONICAL_SYSTEM
-AM_MAINTAINER_MODE
-AM_CONFIG_HEADER(ib_config.h)
-AM_INIT_AUTOMAKE(ib, 0.90)
-
-# This is need before AC_PROG_CC
-#
-
-if test "x${CFLAGS-}" = x ; then
- cflags_is_set=no
-else
- cflags_is_set=yes
-fi
-
-if test "x${CPPFLAGS-}" = x ; then
- cppflags_is_set=no
-else
- cppflags_is_set=yes
-fi
-
-if test "x${LDFLAGS-}" = x ; then
- ldflags_is_set=no
-else
- ldflags_is_set=yes
-fi
-
-# The following hack should ensure that configure doesn't add optimizing
-# or debugging flags to CFLAGS or CXXFLAGS
-CFLAGS="$CFLAGS "
-CXXFLAGS="$CXXFLAGS "
-
-AC_PROG_CC
-AC_PROG_RANLIB
-AC_PROG_INSTALL
-AC_PROG_LIBTOOL
-AC_CHECK_HEADERS(aio.h sched.h)
-AC_CHECK_SIZEOF(int, 4)
-AC_CHECK_SIZEOF(long, 4)
-AC_CHECK_SIZEOF(void*, 4)
-AC_CHECK_FUNCS(sched_yield)
-AC_CHECK_FUNCS(fdatasync)
-AC_CHECK_FUNCS(localtime_r)
-#AC_CHECK_FUNCS(readdir_r) MySQL checks that it has also the right args.
-# Some versions of Unix only take 2 arguments.
-#AC_C_INLINE Already checked in MySQL
-AC_C_BIGENDIAN
-
-# Build optimized or debug version ?
-# First check for gcc and g++
-if test "$ac_cv_prog_gcc" = "yes"
-then
- DEBUG_CFLAGS="-g"
- DEBUG_OPTIMIZE_CC="-O"
- OPTIMIZE_CFLAGS="$MAX_C_OPTIMIZE"
-else
- DEBUG_CFLAGS="-g"
- DEBUG_OPTIMIZE_CC=""
- OPTIMIZE_CFLAGS="-O"
-fi
-if test "$ac_cv_prog_cxx_g" = "yes"
-then
- DEBUG_CXXFLAGS="-g"
- DEBUG_OPTIMIZE_CXX="-O"
- OPTIMIZE_CXXFLAGS="-O3"
-else
- DEBUG_CXXFLAGS="-g"
- DEBUG_OPTIMIZE_CXX=""
- OPTIMIZE_CXXFLAGS="-O"
-fi
-AC_ARG_WITH(debug,
- [ --without-debug Build a production version without debugging code],
- [with_debug=$withval],
- [with_debug=no])
-if test "$with_debug" = "yes"
-then
- # Medium debug.
- CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DDBUG_ON -DSAFE_MUTEX $CFLAGS"
- CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DSAFE_MUTEX $CXXFLAGS"
-elif test "$with_debug" = "full"
-then
- # Full debug. Very slow in some cases
- CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS"
- CXXFLAGS="$DEBUG_CXXFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS"
-else
- # Optimized version. No debug
- CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS -DDEBUG_OFF"
- CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS -DDEBUG_OFF"
-fi
-
-# NOTE: The flags below are disabled by default since we can't easily get
-# rid of the "string over 509 characters in length" warnings, and thus can't
-# add -Werror. But it's a good idea to enable these for a test compile
-# before shipping a new snapshot to MySQL to catch errors that could make
-# the compile fail on non-C99 compilers.
-
-# If using gcc, disallow usage of C99 features to avoid accidentally
-# introducing problems on compilers that only implement C89.
-#if test "$ac_cv_prog_gcc" = "yes"
-#then
-# CFLAGS="$CFLAGS -std=c89 -ansi -pedantic -Wno-long-long"
-#fi
-
-# If using gcc, add some extra warning flags.
-if test "$ac_cv_prog_gcc" = "yes"
-then
- CFLAGS="$CFLAGS -Werror-implicit-function-declaration -Wpointer-arith"
-fi
-
-case "$target_os" in
- lin*)
- CFLAGS="$CFLAGS -DUNIV_LINUX";;
- hpux10*)
- CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX -DUNIV_HPUX10";;
- hp*)
- CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";;
- aix*)
- CFLAGS="$CFLAGS -DUNIV_AIX";;
- irix*)
- CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
- osf*)
- CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
- sysv5uw7*)
- # Problem when linking on SCO
- CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
- openbsd*)
- CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
-esac
-
-case "$target" in
- i[[4567]]86-*-*)
- CFLAGS="$CFLAGS -DUNIV_INTEL_X86";;
- # The compiler on Linux/S390 does not seem to have inlining
- s390-*-*)
- CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
-esac
-
-# must go in pair with AR as set by MYSQL_CHECK_AR
-if test -z "$ARFLAGS"
-then
- ARFLAGS="cru"
-fi
-AC_SUBST(ARFLAGS)
-
-AC_OUTPUT(Makefile os/Makefile ut/Makefile btr/Makefile dnl
- buf/Makefile data/Makefile dnl
- dict/Makefile dyn/Makefile dnl
- eval/Makefile fil/Makefile fsp/Makefile fut/Makefile dnl
- ha/Makefile ibuf/Makefile dnl
- lock/Makefile log/Makefile dnl
- mach/Makefile mem/Makefile mtr/Makefile dnl
- page/Makefile pars/Makefile que/Makefile dnl
- read/Makefile rem/Makefile row/Makefile dnl
- srv/Makefile sync/Makefile thr/Makefile trx/Makefile dnl
- usr/Makefile)
diff --git a/storage/innobase/include/Makefile.i b/storage/innobase/include/Makefile.i
index 87952a7abc8..db436c702ff 100644
--- a/storage/innobase/include/Makefile.i
+++ b/storage/innobase/include/Makefile.i
@@ -1,6 +1,10 @@
# Makefile included in Makefile.am in every subdirectory
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/../../include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \
+ -I$(top_srcdir)/regex \
+ -I$(top_srcdir)/storage/innobase/include \
+ -I$(top_srcdir)/sql \
+ -I$(srcdir)
# Don't update the files from bitkeeper
%::SCCS/s.%
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index f2dafbc3a70..c1f028ef4a3 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -41,7 +41,7 @@ if we are compiling on Windows. */
/* Include the header file generated by GNU autoconf */
#ifndef __WIN__
-#include "../ib_config.h"
+#include "config.h"
#endif
#ifdef HAVE_SCHED_H
diff --git a/storage/innobase/plug.in b/storage/innobase/plug.in
new file mode 100644
index 00000000000..fc1d758fd87
--- /dev/null
+++ b/storage/innobase/plug.in
@@ -0,0 +1,70 @@
+MYSQL_STORAGE_ENGINE(innobase, innodb, [InnoDB Storage Engine],
+ [Transactional Tables using InnoDB], [max,max-no-ndb])
+MYSQL_PLUGIN_DIRECTORY(innobase, [storage/innobase])
+MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a])
+MYSQL_PLUGIN_ACTIONS(innobase, [
+ AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
+ AC_SUBST(innodb_system_libs)
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ AC_PROG_INSTALL
+ AC_PROG_LIBTOOL
+ AC_CHECK_HEADERS(aio.h sched.h)
+ AC_CHECK_SIZEOF(int, 4)
+ AC_CHECK_SIZEOF(long, 4)
+ AC_CHECK_SIZEOF(void*, 4)
+ AC_CHECK_FUNCS(sched_yield)
+ AC_CHECK_FUNCS(fdatasync)
+ AC_CHECK_FUNCS(localtime_r)
+ AC_C_BIGENDIAN
+ case "$target_os" in
+ lin*)
+ CFLAGS="$CFLAGS -DUNIV_LINUX";;
+ hpux10*)
+ CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX -DUNIV_HPUX10";;
+ hp*)
+ CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";;
+ aix*)
+ CFLAGS="$CFLAGS -DUNIV_AIX";;
+ irix*)
+ CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
+ osf*)
+ CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
+ sysv5uw7*)
+ # Problem when linking on SCO
+ CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
+ openbsd*)
+ CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
+ esac
+ AC_CONFIG_FILES(
+ storage/innobase/ut/Makefile
+ storage/innobase/btr/Makefile
+ storage/innobase/buf/Makefile
+ storage/innobase/data/Makefile
+ storage/innobase/dict/Makefile
+ storage/innobase/dyn/Makefile
+ storage/innobase/eval/Makefile
+ storage/innobase/fil/Makefile
+ storage/innobase/fsp/Makefile
+ storage/innobase/fut/Makefile
+ storage/innobase/ha/Makefile
+ storage/innobase/ibuf/Makefile
+ storage/innobase/lock/Makefile
+ storage/innobase/log/Makefile
+ storage/innobase/mach/Makefile
+ storage/innobase/mem/Makefile
+ storage/innobase/mtr/Makefile
+ storage/innobase/os/Makefile
+ storage/innobase/page/Makefile
+ storage/innobase/pars/Makefile
+ storage/innobase/que/Makefile
+ storage/innobase/read/Makefile
+ storage/innobase/rem/Makefile
+ storage/innobase/row/Makefile
+ storage/innobase/srv/Makefile
+ storage/innobase/sync/Makefile
+ storage/innobase/thr/Makefile
+ storage/innobase/trx/Makefile
+ storage/innobase/usr/Makefile)
+ ])
+
diff --git a/storage/myisam/CMakeLists.txt b/storage/myisam/CMakeLists.txt
index 3ba7aba4555..046e4fe28cd 100644
--- a/storage/myisam/CMakeLists.txt
+++ b/storage/myisam/CMakeLists.txt
@@ -1,8 +1,12 @@
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
+ ${CMAKE_SOURCE_DIR}/sql
+ ${CMAKE_SOURCE_DIR}/regex
+ ${CMAKE_SOURCE_DIR}/extra/yassl/include)
ADD_LIBRARY(myisam ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c ft_stem.c
+ ha_myisam.cc
ft_stopwords.c ft_update.c mi_cache.c mi_changed.c mi_check.c
mi_checksum.c mi_close.c mi_create.c mi_dbug.c mi_delete.c
mi_delete_all.c mi_delete_table.c mi_dynrec.c mi_extra.c mi_info.c
diff --git a/storage/myisam/Makefile.am b/storage/myisam/Makefile.am
index 081d7facf3a..fdccb1f5b19 100644
--- a/storage/myisam/Makefile.am
+++ b/storage/myisam/Makefile.am
@@ -14,29 +14,76 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+MYSQLDATAdir = $(localstatedir)
+MYSQLSHAREdir = $(pkgdatadir)
+MYSQLBASEdir= $(prefix)
+MYSQLLIBdir= $(pkglibdir)
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \
+ -I$(top_srcdir)/regex \
+ -I$(top_srcdir)/sql \
+ -I$(srcdir)
+WRAPLIBS=
+
+LDADD =
+
+DEFS = @DEFS@
+
EXTRA_DIST = mi_test_all.sh mi_test_all.res ft_stem.c CMakeLists.txt
pkgdata_DATA = mi_test_all mi_test_all.res
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
-LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
- $(top_builddir)/mysys/libmysys.a \
- $(top_builddir)/dbug/libdbug.a \
- $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
pkglib_LIBRARIES = libmyisam.a
bin_PROGRAMS = myisamchk myisamlog myisampack myisam_ftdump
myisamchk_DEPENDENCIES= $(LIBRARIES)
+myisamchk_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
+ $(top_builddir)/mysys/libmysys.a \
+ $(top_builddir)/dbug/libdbug.a \
+ $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
myisamlog_DEPENDENCIES= $(LIBRARIES)
+myisamlog_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
+ $(top_builddir)/mysys/libmysys.a \
+ $(top_builddir)/dbug/libdbug.a \
+ $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
myisampack_DEPENDENCIES=$(LIBRARIES)
+myisampack_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
+ $(top_builddir)/mysys/libmysys.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 \
+ $(top_builddir)/dbug/libdbug.a \
+ $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
mi_test2_DEPENDENCIES= $(LIBRARIES)
+mi_test2_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
+ $(top_builddir)/mysys/libmysys.a \
+ $(top_builddir)/dbug/libdbug.a \
+ $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
mi_test3_DEPENDENCIES= $(LIBRARIES)
+mi_test3_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
+ $(top_builddir)/mysys/libmysys.a \
+ $(top_builddir)/dbug/libdbug.a \
+ $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
#ft_test1_DEPENDENCIES= $(LIBRARIES)
#ft_eval_DEPENDENCIES= $(LIBRARIES)
myisam_ftdump_DEPENDENCIES= $(LIBRARIES)
+myisam_ftdump_LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
+ $(top_builddir)/mysys/libmysys.a \
+ $(top_builddir)/dbug/libdbug.a \
+ $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
rt_test_DEPENDENCIES= $(LIBRARIES)
+rt_test_LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
+ $(top_builddir)/mysys/libmysys.a \
+ $(top_builddir)/dbug/libdbug.a \
+ $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
sp_test_DEPENDENCIES= $(LIBRARIES)
+sp_test_LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
+ $(top_builddir)/mysys/libmysys.a \
+ $(top_builddir)/dbug/libdbug.a \
+ $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@
libmyisam_a_SOURCES = mi_open.c mi_extra.c mi_info.c mi_rkey.c \
mi_rnext.c mi_rnext_same.c \
mi_search.c mi_page.c mi_key.c mi_locking.c \
@@ -52,9 +99,9 @@ libmyisam_a_SOURCES = mi_open.c mi_extra.c mi_info.c mi_rkey.c \
mi_keycache.c mi_preload.c \
ft_parser.c ft_stopwords.c ft_static.c \
ft_update.c ft_boolean_search.c ft_nlq_search.c sort.c \
+ ha_myisam.cc \
rt_index.c rt_key.c rt_mbr.c rt_split.c sp_key.c
CLEANFILES = test?.MY? FT?.MY? isam.log mi_test_all rt_test.MY? sp_test.MY?
-DEFS = -DMAP_TO_USE_RAID
# Move to automake rules ?
prolint:; plparse -b -u -hF1 "-width(0,0)" "-format=%f:%l:\s%t:%n\s%m" \
diff --git a/sql/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index cbb8a7a48c0..209478ee9a5 100644
--- a/sql/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -19,19 +19,15 @@
#pragma implementation // gcc: Class implementation
#endif
+#define MYSQL_SERVER 1
#include "mysql_priv.h"
+#include <mysql/plugin.h>
#include <m_ctype.h>
#include <myisampack.h>
#include "ha_myisam.h"
#include <stdarg.h>
-#ifndef MASTER
-#include "../srclib/myisam/myisamdef.h"
-#else
-#include "../storage/myisam/myisamdef.h"
-#include "../storage/myisam/rt_index.h"
-#endif
-
-#include <mysql/plugin.h>
+#include "myisamdef.h"
+#include "rt_index.h"
ulong myisam_recover_options= HA_RECOVER_NONE;
diff --git a/sql/ha_myisam.h b/storage/myisam/ha_myisam.h
index 5544e5040b3..5544e5040b3 100644
--- a/sql/ha_myisam.h
+++ b/storage/myisam/ha_myisam.h
diff --git a/storage/myisam/plug.in b/storage/myisam/plug.in
new file mode 100644
index 00000000000..3160752182d
--- /dev/null
+++ b/storage/myisam/plug.in
@@ -0,0 +1,6 @@
+MYSQL_STORAGE_ENGINE(myisam,no, [MyISAM Storage Engine],
+ [Traditional non-transactional MySQL tables])
+MYSQL_PLUGIN_DIRECTORY(myisam, [storage/myisam])
+MYSQL_PLUGIN_STATIC(myisam, [libmyisam.a])
+MYSQL_PLUGIN_MANDATORY(myisam) dnl Default
+
diff --git a/storage/myisammrg/CMakeLists.txt b/storage/myisammrg/CMakeLists.txt
index 83168f6c60c..a86eff9d764 100644
--- a/storage/myisammrg/CMakeLists.txt
+++ b/storage/myisammrg/CMakeLists.txt
@@ -1,8 +1,12 @@
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
+ ${CMAKE_SOURCE_DIR}/sql
+ ${CMAKE_SOURCE_DIR}/regex
+ ${CMAKE_SOURCE_DIR}/extra/yassl/include)
ADD_LIBRARY(myisammrg myrg_close.c myrg_create.c myrg_delete.c myrg_extra.c myrg_info.c
+ ha_myisammrg.cc
myrg_locking.c myrg_open.c myrg_panic.c myrg_queue.c myrg_range.c
myrg_rfirst.c myrg_rkey.c myrg_rlast.c myrg_rnext.c myrg_rnext_same.c
myrg_rprev.c myrg_rrnd.c myrg_rsame.c myrg_static.c myrg_update.c
diff --git a/storage/myisammrg/Makefile.am b/storage/myisammrg/Makefile.am
index 0402f2730b9..08cd52c363f 100644
--- a/storage/myisammrg/Makefile.am
+++ b/storage/myisammrg/Makefile.am
@@ -14,15 +14,31 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
+MYSQLDATAdir = $(localstatedir)
+MYSQLSHAREdir = $(pkgdatadir)
+MYSQLBASEdir= $(prefix)
+MYSQLLIBdir= $(pkglibdir)
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \
+ -I$(top_srcdir)/regex \
+ -I$(top_srcdir)/sql \
+ -I$(srcdir)
+WRAPLIBS=
+
+LDADD =
+
+DEFS = @DEFS@
pkglib_LIBRARIES = libmyisammrg.a
-noinst_HEADERS = myrg_def.h
+noinst_HEADERS = myrg_def.h ha_myisammrg.h
+noinst_LIBRARIES = libmyisammrg.a
libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \
myrg_rrnd.c myrg_update.c myrg_delete.c myrg_rsame.c \
myrg_panic.c myrg_close.c myrg_create.c myrg_static.c \
myrg_rkey.c myrg_rfirst.c myrg_rlast.c myrg_rnext.c \
myrg_rprev.c myrg_queue.c myrg_write.c myrg_range.c \
+ ha_myisammrg.cc \
myrg_rnext_same.c
+
+
EXTRA_DIST = CMakeLists.txt
# Don't update the files from bitkeeper
diff --git a/sql/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc
index 3ae5406824c..8c767e32b83 100644
--- a/sql/ha_myisammrg.cc
+++ b/storage/myisammrg/ha_myisammrg.cc
@@ -19,16 +19,13 @@
#pragma implementation // gcc: Class implementation
#endif
+#define MYSQL_SERVER 1
#include "mysql_priv.h"
+#include <mysql/plugin.h>
#include <m_ctype.h>
#include "ha_myisammrg.h"
-#ifndef MASTER
-#include "../srclib/myisammrg/myrg_def.h"
-#else
-#include "../storage/myisammrg/myrg_def.h"
-#endif
+#include "myrg_def.h"
-#include <mysql/plugin.h>
/*****************************************************************************
** MyISAM MERGE tables
diff --git a/sql/ha_myisammrg.h b/storage/myisammrg/ha_myisammrg.h
index d58a3523c26..d58a3523c26 100644
--- a/sql/ha_myisammrg.h
+++ b/storage/myisammrg/ha_myisammrg.h
diff --git a/storage/myisammrg/plug.in b/storage/myisammrg/plug.in
new file mode 100644
index 00000000000..b4b2af8d984
--- /dev/null
+++ b/storage/myisammrg/plug.in
@@ -0,0 +1,5 @@
+MYSQL_STORAGE_ENGINE(myisammrg,no,[MyISAM MERGE Engine],
+ [Merge multiple MySQL tables into one])
+MYSQL_PLUGIN_DIRECTORY(myisammrg,[storage/myisammrg])
+MYSQL_PLUGIN_STATIC(myisammrg, [libmyisammrg.a])
+MYSQL_PLUGIN_MANDATORY(myisammrg)
diff --git a/storage/ndb/plug.in b/storage/ndb/plug.in
new file mode 100644
index 00000000000..a7e351417b1
--- /dev/null
+++ b/storage/ndb/plug.in
@@ -0,0 +1,6 @@
+MYSQL_STORAGE_ENGINE(ndbcluster, ndbcluster, [Cluster Storage Engine],
+ [High Availability Clustered tables], [max])
+MYSQL_PLUGIN_DIRECTORY(ndbcluster,[storage/ndb])
+MYSQL_PLUGIN_STATIC(ndbcluster, [[\$(ndbcluster_libs) \$(ndbcluster_system_libs) \$(NDB_SCI_LIBS)]])
+MYSQL_PLUGIN_ACTIONS(ndbcluster,[MYSQL_SETUP_NDBCLUSTER])
+MYSQL_PLUGIN_DEPENDS(ndbcluster, [partition])