diff options
author | monty@mysql.com <> | 2006-06-04 21:05:22 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2006-06-04 21:05:22 +0300 |
commit | c46fb742b82d9e894fc8ec92ec18b804af48b1b2 (patch) | |
tree | 8e3365da0e05942d80e6e6ae092f7e0e40832fe2 /storage/example | |
parent | b615e0b6dca974678ea6f9610f42ed4dbeb1bfe5 (diff) | |
parent | 74cc73d4619c94ceb1b93725b1bba7b802f2290d (diff) | |
download | mariadb-git-c46fb742b82d9e894fc8ec92ec18b804af48b1b2.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/home/my/mysql-5.1
Diffstat (limited to 'storage/example')
-rw-r--r-- | storage/example/ha_example.cc | 7 | ||||
-rw-r--r-- | storage/example/ha_example.h | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index 28bccc7df2d..feabad2e356 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); @@ -199,9 +199,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); } @@ -714,6 +714,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. */ |