Below is the list of changes that have just been committed into a local
5.1 repository of antony. When antony does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2029 06/01/03 18:23:00 acurtis@stripped +6 -0
Make archive a plugin
storage/archive/ha_archive.h
1.37 06/01/03 18:22:50 acurtis@stripped +1 -1
Make archive a plugin
storage/archive/ha_archive.cc
1.72 06/01/03 18:22:50 acurtis@stripped +32 -5
Make archive a plugin
storage/archive/Makefile.am
1.2 06/01/03 18:22:50 acurtis@stripped +15 -6
Make archive a plugin
sql/Makefile.am
1.130 06/01/03 18:22:50 acurtis@stripped +2 -2
Make archive a plugin
libmysqld/Makefile.am
1.77 06/01/03 18:22:50 acurtis@stripped +1 -2
Make archive a plugin
configure.in
1.331 06/01/03 18:22:50 acurtis@stripped +1 -2
Make archive a plugin
storage/archive/ha_archive.h
1.36 06/01/03 17:21:47 acurtis@stripped +0 -0
Rename: sql/ha_archive.h -> storage/archive/ha_archive.h
storage/archive/ha_archive.cc
1.71 06/01/03 17:21:47 acurtis@stripped +0 -0
Rename: sql/ha_archive.cc -> storage/archive/ha_archive.cc
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: acurtis
# Host: localhost.(none)
# Root: /home/antony/work2/mysql-5.1-archive
--- 1.330/configure.in 2005-12-31 01:13:33 -08:00
+++ 1.331/configure.in 2006-01-03 18:22:50 -08:00
@@ -2439,8 +2439,7 @@
MYSQL_STORAGE_ENGINE(example,,,,,no,storage/example,,,[
AC_CONFIG_FILES(storage/example/Makefile)
])
-MYSQL_STORAGE_ENGINE(archive,,,,,,storage/archive,,
- \$(top_builddir)/storage/archive/libarchive.a, [
+MYSQL_STORAGE_ENGINE(archive,,,,,no,storage/archive,,, [
AC_CONFIG_FILES(storage/archive/Makefile)
])
MYSQL_STORAGE_ENGINE(csv,,,,,no,storage/csv,,,[
--- 1.129/sql/Makefile.am 2005-12-31 01:13:33 -08:00
+++ 1.130/sql/Makefile.am 2006-01-03 18:22:50 -08:00
@@ -99,8 +99,8 @@
sp_cache.cc parse_file.cc sql_trigger.cc \
sql_plugin.cc sql_binlog.cc \
handlerton.cc
-EXTRA_mysqld_SOURCES = ha_innodb.cc ha_berkeley.cc ha_archive.cc \
- ha_innodb.h ha_berkeley.h ha_archive.h \
+EXTRA_mysqld_SOURCES = ha_innodb.cc ha_berkeley.cc \
+ ha_innodb.h ha_berkeley.h \
ha_blackhole.cc ha_federated.cc ha_ndbcluster.cc \
ha_blackhole.h ha_federated.h ha_ndbcluster.h \
ha_partition.cc ha_partition.h
--- 1.70/sql/ha_archive.cc 2005-12-27 18:55:55 -08:00
+++ 1.72/storage/archive/ha_archive.cc 2006-01-03 18:22:50 -08:00
@@ -23,6 +23,10 @@
#include "ha_archive.h"
#include <my_dir.h>
+#ifdef MYSQL_PLUGIN
+#include <plugin.h>
+#endif
+
/*
First, if you want to understand storage engines you should look at
ha_example.cc and ha_example.h.
@@ -145,7 +149,7 @@
SHOW_OPTION_YES,
"Archive storage engine",
DB_TYPE_ARCHIVE_DB,
- archive_db_init,
+ (bool (*)())archive_db_init,
0, /* slot */
0, /* savepoint size. */
NULL, /* close_connection */
@@ -198,9 +202,11 @@
TRUE Error
*/
-bool archive_db_init()
+int archive_db_init()
{
DBUG_ENTER("archive_db_init");
+ if (archive_inited)
+ DBUG_RETURN(0);
if (pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST))
goto error;
if (hash_init(&archive_open_tables, system_charset_info, 32, 0, 0,
@@ -211,11 +217,10 @@
else
{
archive_inited= TRUE;
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(0);
}
error:
- have_archive_db= SHOW_OPTION_DISABLED; // If we couldn't use handler
- DBUG_RETURN(TRUE);
+ DBUG_RETURN(-1);
}
/*
@@ -1145,3 +1150,25 @@
DBUG_RETURN(HA_ADMIN_OK);
}
}
+
+
+#ifdef MYSQL_PLUGIN
+static int archive_plugin_done()
+{
+ archive_db_end(HA_PANIC_CLOSE);
+}
+
+
+mysql_declare_plugin
+{
+ MYSQL_STORAGE_ENGINE_PLUGIN,
+ &archive_hton,
+ archive_hton.name,
+ "Brian Aker, MySQL AB",
+ "Archive Storage Engine",
+ archive_db_init, /* Plugin Init */
+ archive_plugin_done, /* Plugin Deinit */
+ 0x0100 /* 1.0 */,
+}
+mysql_declare_plugin_end;
+#endif
--- 1.35/sql/ha_archive.h 2005-12-23 12:22:21 -08:00
+++ 1.37/storage/archive/ha_archive.h 2006-01-03 18:22:50 -08:00
@@ -109,6 +109,6 @@
bool check_and_repair(THD *thd);
};
-bool archive_db_init(void);
+int archive_db_init(void);
int archive_db_end(ha_panic_function type);
--- 1.1/storage/archive/Makefile.am 2005-12-22 19:49:59 -08:00
+++ 1.2/storage/archive/Makefile.am 2006-01-03 18:22:50 -08:00
@@ -15,17 +15,26 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
+ -I$(top_srcdir)/regex -I$(top_srcdir)/sql \
@ZLIB_INCLUDES@
-LDADD = libarchive.a $(top_srcdir)/mysys/libmysys.a \
+LDADD =
+
+DEFS = -DMYSQL_SERVER -DMYSQL_PLUGIN @DEFS@
+
+noinst_HEADERS = ha_archive.h azlib.h
+pkglib_LTLIBRARIES = ha_archive.la
+
+ha_archive_la_LDFLAGS = -module @ZLIB_LIBS@
+ha_archive_la_SOURCES = ha_archive.cc azio.c
+
+noinst_PROGRAMS = archive_test
+archive_test_LDADD = .libs/ha_archive.a \
+ $(top_srcdir)/mysys/libmysys.a \
$(top_srcdir)/dbug/libdbug.a \
$(top_srcdir)/strings/libmystrings.a \
@ZLIB_LIBS@
-pkglib_LIBRARIES = libarchive.a
-noinst_PROGRAMS = archive_test
-archive_test_LDFLAGS = @NOINST_LDFLAGS@
-noinst_HEADERS = azlib.h
-libarchive_a_SOURCES = azio.c
+archive_test_SOURCES = archive_test.c
# Don't update the files from bitkeeper
%::SCCS/s.%
--- 1.76/libmysqld/Makefile.am 2005-12-22 20:04:23 -08:00
+++ 1.77/libmysqld/Makefile.am 2006-01-03 18:22:50 -08:00
@@ -68,7 +68,7 @@
rpl_filter.cc sql_partition.cc handlerton.cc sql_plugin.cc
libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources)
-EXTRA_libmysqld_a_SOURCES = ha_innodb.cc ha_berkeley.cc ha_archive.cc \
+EXTRA_libmysqld_a_SOURCES = ha_innodb.cc ha_berkeley.cc \
ha_blackhole.cc ha_federated.cc ha_ndbcluster.cc \
ha_partition.cc
libmysqld_a_DEPENDENCIES= @mysql_se_objs@
@@ -83,7 +83,6 @@
INC_LIB= $(top_builddir)/regex/libregex.a \
$(top_builddir)/storage/myisam/libmyisam.a \
$(top_builddir)/storage/myisammrg/libmyisammrg.a \
- $(top_builddir)/storage/archive/libarchive.a \
$(top_builddir)/storage/heap/libheap.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a \
| Thread |
|---|
| • bk commit into 5.1 tree (acurtis:1.2029) | antony | 4 Jan |