diff options
Diffstat (limited to 'sql/examples/ha_example.cc')
-rw-r--r-- | sql/examples/ha_example.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sql/examples/ha_example.cc b/sql/examples/ha_example.cc index d340b9289ec..68aed7c6483 100644 --- a/sql/examples/ha_example.cc +++ b/sql/examples/ha_example.cc @@ -69,9 +69,9 @@ #include "../mysql_priv.h" -#ifdef HAVE_EXAMPLE_DB #include "ha_example.h" +static handler* example_create_handler(TABLE *table); handlerton example_hton= { "EXAMPLE", @@ -94,6 +94,15 @@ handlerton example_hton= { NULL, /* create_cursor_read_view */ NULL, /* set_cursor_read_view */ NULL, /* close_cursor_read_view */ + example_create_handler, /* Create a new handler */ + NULL, /* Drop a database */ + NULL, /* Panic call */ + NULL, /* Release temporary latches */ + NULL, /* Update Statistics */ + NULL, /* Start Consistent Snapshot */ + NULL, /* Flush logs */ + NULL, /* Show status */ + NULL, /* Replication Report Sent Binlog */ HTON_CAN_RECREATE }; @@ -204,6 +213,12 @@ static int free_share(EXAMPLE_SHARE *share) } +static handler* example_create_handler(TABLE *table) +{ + return new ha_example(table); +} + + ha_example::ha_example(TABLE *table_arg) :handler(&example_hton, table_arg) {} @@ -696,4 +711,3 @@ int ha_example::create(const char *name, TABLE *table_arg, /* This is not implemented but we want someone to be able that it works. */ DBUG_RETURN(0); } -#endif /* HAVE_EXAMPLE_DB */ |