summaryrefslogtreecommitdiff
path: root/storage/example
diff options
context:
space:
mode:
Diffstat (limited to 'storage/example')
-rw-r--r--storage/example/ha_example.cc7
-rw-r--r--storage/example/ha_example.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc
index 2ce543dfbb0..f2f4694b54e 100644
--- a/storage/example/ha_example.cc
+++ b/storage/example/ha_example.cc
@@ -72,7 +72,7 @@
#include <mysql/plugin.h>
-static handler* example_create_handler(TABLE_SHARE *table);
+static handler *example_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root);
static int example_init_func();
static bool example_init_func_for_handlerton();
static int example_panic(enum ha_panic_function flag);
@@ -244,9 +244,9 @@ static int free_share(EXAMPLE_SHARE *share)
}
-static handler* example_create_handler(TABLE_SHARE *table)
+static handler* example_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
{
- return new ha_example(table);
+ return new (mem_root) ha_example(table);
}
@@ -756,6 +756,7 @@ mysql_declare_plugin(example)
example_init_func, /* Plugin Init */
example_done_func, /* Plugin Deinit */
0x0001 /* 0.1 */,
+ 0
}
mysql_declare_plugin_end;
diff --git a/storage/example/ha_example.h b/storage/example/ha_example.h
index 139a50a3281..956dc62311c 100644
--- a/storage/example/ha_example.h
+++ b/storage/example/ha_example.h
@@ -62,7 +62,7 @@ public:
implements. The current table flags are documented in
handler.h
*/
- ulong table_flags() const
+ ulonglong table_flags() const
{
return 0;
}
@@ -97,7 +97,7 @@ public:
/*
Called in test_quick_select to determine if indexes should be used.
*/
- virtual double scan_time() { return (double) (records+deleted) / 20.0+10; }
+ virtual double scan_time() { return (double) (stats.records+stats.deleted) / 20.0+10; }
/*
The next method will never be called if you do not implement indexes.
*/