diff options
Diffstat (limited to 'sql/ha_blackhole.cc')
-rw-r--r-- | sql/ha_blackhole.cc | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/sql/ha_blackhole.cc b/sql/ha_blackhole.cc index 9ac4ba2da15..2505919af39 100644 --- a/sql/ha_blackhole.cc +++ b/sql/ha_blackhole.cc @@ -24,10 +24,48 @@ #include "ha_blackhole.h" +/* Blackhole storage engine handlerton */ + +handlerton blackhole_hton= { + "BLACKHOLE", + SHOW_OPTION_YES, + "/dev/null storage engine (anything you write to it disappears)", + DB_TYPE_BLACKHOLE_DB, + NULL, + 0, /* slot */ + 0, /* savepoint size. */ + NULL, /* close_connection */ + NULL, /* savepoint */ + NULL, /* rollback to savepoint */ + NULL, /* release savepoint */ + NULL, /* commit */ + NULL, /* rollback */ + NULL, /* prepare */ + NULL, /* recover */ + NULL, /* commit_by_xid */ + NULL, /* rollback_by_xid */ + NULL, /* create_cursor_read_view */ + NULL, /* set_cursor_read_view */ + NULL, /* close_cursor_read_view */ + HTON_CAN_RECREATE +}; + +/***************************************************************************** +** BLACKHOLE tables +*****************************************************************************/ + +ha_blackhole::ha_blackhole(TABLE *table_arg) + :handler(&blackhole_hton, table_arg) +{} + + +static const char *ha_blackhole_exts[] = { + NullS +}; + const char **ha_blackhole::bas_ext() const -{ - static const char *ext[]= { NullS }; - return ext; +{ + return ha_blackhole_exts; } int ha_blackhole::open(const char *name, int mode, uint test_if_locked) |