1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Next big patch for loadable storage engines!

Handlerton array is now created instead of using sys_table_types_st. All storage engines can now have inits and giant ifdef's are now gone for startup. No compeltely clean yet, handlertons will next be merged with sys_table_types. Federated and archive now have real cleanup if their inits fail. 


sql/examples/ha_archive.cc:
  Modifications for new ha_init code. The init method now checks for errors and will not start up if the errors occur.
sql/examples/ha_archive.h:
  Change for new init method.
sql/examples/ha_example.cc:
  New handlerton pieces.
sql/examples/ha_tina.cc:
  New handlerton pieces.
sql/ha_berkeley.cc:
  New handlerton pieces, plus changes for ha_init changes. I'm not happy with our current "skip" setup.
sql/ha_berkeley.h:
  Change in init return.
sql/ha_blackhole.cc:
  Changes for new handlerton pieces.
sql/ha_federated.cc:
  Changes for new handlerton and true cleanup code.
sql/ha_heap.cc:
  Changes for new handlerton returns.
sql/ha_innodb.cc:
  Changes for handlerton code.
sql/ha_innodb.h:
  Change in init.
sql/ha_myisam.cc:
  Changes for additional handlerton bits.
sql/ha_myisammrg.cc:
  Changes for  new handlerton bits.
sql/ha_ndbcluster.cc:
  Changes for new handlerton bits.
sql/ha_ndbcluster.h:
  Changes for handlerton bits.
sql/handler.cc:
  Changes for ditching show_table_type_st types, and collapsing it into a handlerton array. The ha_init now just loops through all handlers to init (much cleaner...). handlertons and sys_table_types should be merged next.
sql/handler.h:
  Additions for sys_table_types
sql/log.cc:
  Clean up of binlog for changes in handlerton
sql/mysql_priv.h:
  Removed unneeded define for binlog_init
sql/sql_show.cc:
  Changes for change in handlerton to sys_table_types
This commit is contained in:
unknown
2005-10-02 19:44:28 -07:00
parent a5dd3d5d8f
commit 5655d31d5f
20 changed files with 244 additions and 239 deletions

View File

@ -297,6 +297,27 @@ typedef struct
storage engine name as it should be printed to a user
*/
const char *name;
/*
Historical marker for if the engine is available of not
*/
SHOW_COMP_OPTION state;
/*
A comment used by SHOW to describe an engine.
*/
const char *comment;
/*
Historical number used for frm file to determine the correct storage engine.
This is going away and new engines will just use "name" for this.
*/
enum db_type db_type;
/*
Method that initizlizes a storage engine
*/
bool (*init)();
/*
each storage engine has it's own memory area (actually a pointer)
in the thd, for storing per-connection information.
@ -356,14 +377,6 @@ typedef struct
uint32 flags; /* global handler flags */
} handlerton;
struct show_table_type_st {
const char *type;
SHOW_COMP_OPTION *value;
const char *comment;
enum db_type db_type;
handlerton *ht;
};
struct show_table_alias_st {
const char *alias;
const char *type;
@ -828,7 +841,7 @@ public:
/* Some extern variables used with handlers */
extern struct show_table_type_st sys_table_types[];
extern handlerton *sys_table_types[];
extern const char *ha_row_type[];
extern TYPELIB tx_isolation_typelib;
extern TYPELIB myisam_stats_method_typelib;