diff options
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/sql/handler.h b/sql/handler.h index 7fc2bf2fece..05a9e13653c 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1,3 +1,6 @@ +#ifndef HANDLER_INCLUDED +#define HANDLER_INCLUDED + /* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify @@ -214,6 +217,13 @@ #define MAX_HA 15 /* + Use this instead of 0 as the initial value for the slot number of + handlerton, so that we can distinguish uninitialized slot number + from slot 0. +*/ +#define HA_SLOT_UNDEF ((uint)-1) + +/* Parameters for open() (in register form->filestat) HA_GET_INFO does an implicit HA_ABORT_IF_LOCKED */ @@ -504,9 +514,8 @@ class st_alter_tablespace : public Sql_alloc /* The handler for a table type. Will be included in the TABLE structure */ -struct st_table; -typedef struct st_table TABLE; -typedef struct st_table_share TABLE_SHARE; +struct TABLE; +struct TABLE_SHARE; struct st_foreign_key_info; typedef struct st_foreign_key_info FOREIGN_KEY_INFO; typedef bool (stat_print_fn)(THD *thd, const char *type, uint type_len, @@ -581,6 +590,7 @@ struct handler_iterator { void *buffer; }; +class handler; /* handlerton is a singleton structure - one instance per storage engine - to provide access to storage engine functionality that works on the @@ -1084,8 +1094,8 @@ class handler :public Sql_alloc public: typedef ulonglong Table_flags; protected: - struct st_table_share *table_share; /* The table definition */ - struct st_table *table; /* The current open table */ + TABLE_SHARE *table_share; /* The table definition */ + TABLE *table; /* The current open table */ Table_flags cached_table_flags; /* Set on init() and open() */ ha_rows estimation_rows_to_insert; @@ -1161,7 +1171,7 @@ public: virtual ~handler(void) { DBUG_ASSERT(locked == FALSE); - /* TODO: DBUG_ASSERT(inited == NONE); */ + DBUG_ASSERT(inited == NONE); } virtual handler *clone(MEM_ROOT *mem_root); /** This is called after create to allow us to set up cached variables */ @@ -2072,3 +2082,4 @@ int ha_binlog_end(THD *thd); #define ha_binlog_wait(a) do {} while (0) #define ha_binlog_end(a) do {} while (0) #endif +#endif /* HANDLER_INCLUDED */ |