mirror of
https://github.com/MariaDB/server.git
synced 2025-04-28 06:45:23 +03:00
Give BerkeleyDB savepoints Remove "enum db_type" from most of the code storage/example/ha_example.h: Rename: sql/examples/ha_example.h -> storage/example/ha_example.h storage/csv/ha_tina.h: Rename: sql/examples/ha_tina.h -> storage/csv/ha_tina.h config/ac-macros/storage.m4: if hton name is "no", then we don't install it as a builtin configure.in: pluggable changes include/plugin.h: version field mysql-test/r/bdb.result: savepoint results copied from innodb test mysql-test/r/information_schema.result: PLUGINS information schema mysql-test/r/information_schema_db.result: PLUGINS information schema mysql-test/t/bdb.test: savepoint test copied from innodb test sql/Makefile.am: tina and example are not here anymore sql/authors.h: minor tweek sql/ha_archive.cc: remove unwanted handlerton entries sql/ha_berkeley.cc: remove unwanted handlerton entries support for savepoints changes to show logs sql/ha_blackhole.cc: remove unwanted handlerton entries sql/ha_federated.cc: remove unwanted handlerton entries sql/ha_heap.cc: remove unwanted handlerton entries sql/ha_innodb.cc: remove unwanted handlerton entries changes for show status sql/ha_myisam.cc: remove unwanted handlerton entries sql/ha_myisammrg.cc: remove unwanted handlerton entries sql/ha_ndbcluster.cc: remove unwanted handlerton entries changes to stat_print sql/ha_partition.cc: remove unwanted handlerton entries bye bye enum db_type sql/ha_partition.h: bye bye enum db_type sql/handler.cc: remove unwanted handlerton entries bye bye enum db_type sql/handler.h: remove unwanted handlerton entries bye bye enum db_type changes to stat_print_fn sql/item_sum.cc: bye bye enum db_type sql/log.cc: remove unwanted handlerton entries sql/mysql_priv.h: bye bye enum db_type sql/mysqld.cc: bye bye enum db_type reorder plugin initialization sql/set_var.cc: bye bye enum db_type sql/set_var.h: bye bye enum db_type sql/sql_base.cc: bye bye enum db_type sql/sql_cache.cc: bye bye enum db_type sql/sql_class.h: bye bye enum db_type sql/sql_delete.cc: bye bye enum db_type sql/sql_insert.cc: bye bye enum db_type sql/sql_lex.h: show plugin sql/sql_parse.cc: bye bye enum db_type sql/sql_partition.cc: bye bye enum db_type sql/sql_plugin.cc: loadable storage engines sql/sql_plugin.h: loadable storage engines sql/sql_rename.cc: bye bye enum db_type sql/sql_select.cc: bye bye enum db_type sql/sql_show.cc: SHOW PLUGIN PLUGINS information schema changes to show engines sql/sql_table.cc: bye bye enum db_type sql/sql_view.cc: bye bye enum db_type sql/sql_view.h: bye bye enum db_type sql/sql_yacc.yy: bye bye enum db_type sql/table.cc: bye bye enum db_type sql/table.h: bye bye enum db_type sql/unireg.cc: bye bye enum db_type storage/csv/ha_tina.cc: make tina into a loadable plugin storage/example/ha_example.cc: make into a plugin storage/csv/Makefile.am: New BitKeeper file ``storage/csv/Makefile.am'' storage/example/Makefile.am: New BitKeeper file ``storage/example/Makefile.am''
73 lines
2.3 KiB
C
73 lines
2.3 KiB
C
/* Copyright (C) 2005 MySQL 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 */
|
|
|
|
#ifndef _sql_plugin_h
|
|
#define _sql_plugin_h
|
|
|
|
#include <plugin.h>
|
|
|
|
#define MYSQL_ANY_PLUGIN -1
|
|
|
|
enum enum_plugin_state
|
|
{
|
|
PLUGIN_IS_FREED= 0,
|
|
PLUGIN_IS_DELETED,
|
|
PLUGIN_IS_UNINITIALIZED,
|
|
PLUGIN_IS_READY
|
|
};
|
|
|
|
/* A handle for the dynamic library containing a plugin or plugins. */
|
|
|
|
struct st_plugin_dl
|
|
{
|
|
LEX_STRING dl;
|
|
void *handle;
|
|
struct st_mysql_plugin *plugins;
|
|
int version;
|
|
uint ref_count; /* number of plugins loaded from the library */
|
|
};
|
|
|
|
/* A handle of a plugin */
|
|
|
|
struct st_plugin_int
|
|
{
|
|
LEX_STRING name;
|
|
struct st_mysql_plugin *plugin;
|
|
struct st_plugin_dl *plugin_dl;
|
|
enum enum_plugin_state state;
|
|
uint ref_count; /* number of threads using the plugin */
|
|
};
|
|
|
|
extern char *opt_plugin_dir_ptr;
|
|
extern char opt_plugin_dir[FN_REFLEN];
|
|
extern int plugin_init(void);
|
|
extern void plugin_load(void);
|
|
extern void plugin_free(void);
|
|
extern my_bool plugin_is_ready(LEX_STRING *name, int type);
|
|
extern st_plugin_int *plugin_lock(LEX_STRING *name, int type);
|
|
extern void plugin_unlock(struct st_plugin_int *plugin);
|
|
extern my_bool mysql_install_plugin(THD *thd, LEX_STRING *name, LEX_STRING *dl);
|
|
extern my_bool mysql_uninstall_plugin(THD *thd, LEX_STRING *name);
|
|
|
|
extern my_bool plugin_register_builtin(struct st_mysql_plugin *plugin);
|
|
|
|
typedef my_bool (plugin_foreach_func)(THD *thd,
|
|
st_plugin_int *plugin,
|
|
void *arg);
|
|
extern my_bool plugin_foreach(THD *thd, plugin_foreach_func *func,
|
|
int type, void *arg);
|
|
#endif
|