diff options
author | unknown <brian@brian-akers-computer.local> | 2004-04-12 21:01:45 -0700 |
---|---|---|
committer | unknown <brian@brian-akers-computer.local> | 2004-04-12 21:01:45 -0700 |
commit | 01bff53c4f71b9d204bc42b654e73d4ec6e6a941 (patch) | |
tree | 686ebbc1135999578321bffc95e6f3aec84ad720 /sql/handler.cc | |
parent | 83c2292bb5617128bd5c0eaa69663072363b38c7 (diff) | |
download | mariadb-git-01bff53c4f71b9d204bc42b654e73d4ec6e6a941.tar.gz |
All changes are to allow someone to compile the example storage engine and use it.
acconfig.h:
Default undef for example storage engine.
acinclude.m4:
Build macro additions for example engine.
configure.in:
Configure changes for it to be listed in --help
sql/Makefile.am:
Added in paths to build example.
sql/examples/ha_example.cc:
Correction in indention and a few minor other corrections. It now lets you create/open/drop example engine.
sql/handler.cc:
Added definition for the example storage engine. Added case for it to be created.
sql/handler.h:
Added example storage engine type.
sql/mysql_priv.h:
Added flag for optional build of example storage engine.
sql/mysqld.cc:
Pieces to build example storage engine.
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index ddf2e68db47..58147e7e937 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -32,6 +32,9 @@ #ifdef HAVE_BERKELEY_DB #include "ha_berkeley.h" #endif +#ifdef HAVE_EXAMPLE_DB +#include "examples/ha_example.h" +#endif #ifdef HAVE_INNOBASE_DB #include "ha_innodb.h" #else @@ -76,6 +79,8 @@ struct show_table_type_st sys_table_types[]= "Supports transactions and page-level locking", DB_TYPE_BERKELEY_DB}, {"BERKELEYDB",&have_berkeley_db, "Alias for BDB", DB_TYPE_BERKELEY_DB}, + {"EXAMPLE",&have_example_db, + "Example storage engine", DB_TYPE_EXAMPLE_DB}, {NullS, NULL, NullS, DB_TYPE_UNKNOWN} }; @@ -172,6 +177,10 @@ handler *get_new_handler(TABLE *table, enum db_type db_type) case DB_TYPE_INNODB: return new ha_innobase(table); #endif +#ifdef HAVE_EXAMPLE_DB + case DB_TYPE_EXAMPLE_DB: + return new ha_example(table); +#endif case DB_TYPE_HEAP: return new ha_heap(table); default: // should never happen |