summaryrefslogtreecommitdiff
path: root/storage/blackhole
diff options
context:
space:
mode:
Diffstat (limited to 'storage/blackhole')
-rw-r--r--storage/blackhole/ha_blackhole.cc18
-rw-r--r--storage/blackhole/ha_blackhole.h8
2 files changed, 9 insertions, 17 deletions
diff --git a/storage/blackhole/ha_blackhole.cc b/storage/blackhole/ha_blackhole.cc
index 3ee784c201f..1a2bb264ef9 100644
--- a/storage/blackhole/ha_blackhole.cc
+++ b/storage/blackhole/ha_blackhole.cc
@@ -25,10 +25,10 @@
/* Static declarations for handlerton */
handlerton blackhole_hton;
-
-static handler *blackhole_create_handler(TABLE_SHARE *table)
+static handler *blackhole_create_handler(TABLE_SHARE *table,
+ MEM_ROOT *mem_root)
{
- return new ha_blackhole(table);
+ return new (mem_root) ha_blackhole(table);
}
@@ -123,16 +123,9 @@ void ha_blackhole::info(uint flag)
{
DBUG_ENTER("ha_blackhole::info");
- records= 0;
- deleted= 0;
- errkey= 0;
- mean_rec_length= 0;
- data_file_length= 0;
- index_file_length= 0;
- max_data_file_length= 0;
- delete_length= 0;
+ bzero((char*) &stats, sizeof(stats));
if (flag & HA_STATUS_AUTO)
- auto_increment_value= 1;
+ stats.auto_increment_value= 1;
DBUG_VOID_RETURN;
}
@@ -230,5 +223,6 @@ mysql_declare_plugin(blackhole)
blackhole_init, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,
+ 0
}
mysql_declare_plugin_end;
diff --git a/storage/blackhole/ha_blackhole.h b/storage/blackhole/ha_blackhole.h
index 15e12659aa0..55c26f6f02e 100644
--- a/storage/blackhole/ha_blackhole.h
+++ b/storage/blackhole/ha_blackhole.h
@@ -40,12 +40,11 @@ public:
*/
const char *index_type(uint key_number);
const char **bas_ext() const;
- ulong table_flags() const
+ ulonglong table_flags() const
{
return(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER |
- HA_DUPP_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY |
- HA_FILE_BASED | HA_CAN_GEOMETRY | HA_READ_RND_SAME |
- HA_CAN_INSERT_DELAYED);
+ HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY |
+ HA_FILE_BASED | HA_CAN_GEOMETRY | HA_CAN_INSERT_DELAYED);
}
ulong index_flags(uint inx, uint part, bool all_parts) const
{
@@ -84,5 +83,4 @@ public:
THR_LOCK_DATA **store_lock(THD *thd,
THR_LOCK_DATA **to,
enum thr_lock_type lock_type);
- bool has_transactions() { return 1; }
};