diff options
author | unknown <brian@zim.(none)> | 2005-03-22 16:10:39 -0800 |
---|---|---|
committer | unknown <brian@zim.(none)> | 2005-03-22 16:10:39 -0800 |
commit | 8a99997d6061ec3e2d75616422eac413868ceada (patch) | |
tree | 5c6b4d736e4b7ef46a5f108c4b75ea97249d7398 /sql/handler.cc | |
parent | 5b32b8e1dd281d15de4ccafb23dde29b43303850 (diff) | |
download | mariadb-git-8a99997d6061ec3e2d75616422eac413868ceada.tar.gz |
Additional storage engine called "blackhole". Customer request, and for that matter a Zawodny request. With this you can alter table to a type of table that would never store data. Its a /dev/null for a database.
acinclude.m4:
New macro rule for ha_blackhole.
configure.in:
Rule enabling blackhole engine
sql/Makefile.am:
Additions to Makefile for blackhole engine
sql/handler.cc:
Ifdef enable code for blackhole (and message for "what does this thing do").
sql/handler.h:
Flag for storage engine type.
sql/mysql_priv.h:
Added blackhole type.
sql/mysqld.cc:
Updates for building backhole.
sql/set_var.cc:
Show variable for blackhole 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 70ba236a5d5..b12032ccd81 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -32,6 +32,9 @@ #ifdef HAVE_BERKELEY_DB #include "ha_berkeley.h" #endif +#ifdef HAVE_BLACKHOLE_DB +#include "ha_blackhole.h" +#endif #ifdef HAVE_EXAMPLE_DB #include "examples/ha_example.h" #endif @@ -96,6 +99,8 @@ struct show_table_type_st sys_table_types[]= "Archive storage engine", DB_TYPE_ARCHIVE_DB}, {"CSV",&have_csv_db, "CSV storage engine", DB_TYPE_CSV_DB}, + {"BLACKHOLE",&have_blackhole_db, + "Storage engine designed to act as null storage", DB_TYPE_BLACKHOLE_DB}, {NullS, NULL, NullS, DB_TYPE_UNKNOWN} }; @@ -204,6 +209,10 @@ handler *get_new_handler(TABLE *table, enum db_type db_type) case DB_TYPE_ARCHIVE_DB: return new ha_archive(table); #endif +#ifdef HAVE_BLACKHOLE_DB + case DB_TYPE_BLACKHOLE_DB: + return new ha_blackhole(table); +#endif #ifdef HAVE_CSV_DB case DB_TYPE_CSV_DB: return new ha_tina(table); |