18
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
/* Structs that defines the Table */
25
#ifndef DRIZZLED_TABLE_H
26
#define DRIZZLED_TABLE_H
29
24
#include <boost/dynamic_bitset.hpp>
31
#include "drizzled/order.h"
32
#include "drizzled/filesort_info.h"
33
#include "drizzled/natural_join_column.h"
34
#include "drizzled/field_iterator.h"
35
#include "drizzled/cursor.h"
36
#include "drizzled/lex_string.h"
37
#include "drizzled/table_list.h"
38
#include "drizzled/table/instance.h"
39
#include "drizzled/atomics.h"
40
#include "drizzled/query_id.h"
42
#include "drizzled/visibility.h"
51
class SecurityContext;
53
class Select_Lex_Unit;
55
namespace field { class Epoch; }
56
namespace plugin { class StorageEngine; }
58
typedef enum enum_table_category TABLE_CATEGORY;
59
typedef struct st_columndef MI_COLUMNDEF;
26
#include <drizzled/order.h>
27
#include <drizzled/filesort_info.h>
28
#include <drizzled/natural_join_column.h>
29
#include <drizzled/field_iterator.h>
30
#include <drizzled/cursor.h>
31
#include <drizzled/lex_string.h>
32
#include <drizzled/table/instance.h>
33
#include <drizzled/atomics.h>
35
#include <drizzled/visibility.h>
62
40
* Class representing a set of records, either in a temporary,
338
316
void init_mem_root()
340
init_sql_alloc(&mem_root, TABLE_ALLOC_BLOCK_SIZE, 0);
318
if (not mem_root.alloc_root_inited())
319
mem_root.init(TABLE_ALLOC_BLOCK_SIZE);
343
memory::Root *getMemRoot()
345
if (not mem_root.alloc_root_inited())
353
void *alloc_root(size_t arg)
355
if (not mem_root.alloc_root_inited())
360
return mem_root.alloc_root(arg);
363
char *strmake_root(const char *str_arg, size_t len_arg)
365
if (not mem_root.alloc_root_inited())
370
return mem_root.strmake_root(str_arg, len_arg);
328
unsigned char* alloc(size_t arg)
331
return mem_root.alloc(arg);
334
char* strmake(const char* str_arg, size_t len_arg)
337
return mem_root.strmake(str_arg, len_arg);
373
340
filesort_info sort;
472
439
* true when out of memory
474
bool fill_item_list(List<Item> *item_list) const;
441
void fill_item_list(List<Item>&) const;
475
442
void clear_column_bitmaps(void);
476
443
void prepare_for_position(void);
477
444
void mark_columns_used_by_index_no_reset(uint32_t index, boost::dynamic_bitset<>& bitmap);
810
777
List<LEX_STRING> referenced_fields;
815
780
#define JOIN_TYPE_LEFT 1
816
781
#define JOIN_TYPE_RIGHT 2
820
class Tmp_Table_Param;
822
783
void free_blobs(Table *table);
823
784
int set_zone(int nr,int min_zone,int max_zone);
824
785
uint32_t convert_period_to_month(uint32_t period);
827
788
int test_if_number(char *str,int *res,bool allow_wildcards);
828
789
void change_byte(unsigned char *,uint,char,char);
830
namespace optimizer { class SqlSelect; }
832
790
void change_double_for_sort(double nr,unsigned char *to);
833
791
int get_quick_record(optimizer::SqlSelect *select);
835
793
void find_date(char *pos,uint32_t *vek,uint32_t flag);
836
TYPELIB *convert_strings_to_array_type(char * *typelibs, char * *end);
837
TYPELIB *typelib(memory::Root *mem_root, List<String> &strings);
794
TYPELIB* convert_strings_to_array_type(char** typelibs, char** end);
795
TYPELIB* typelib(memory::Root&, List<String>&);
838
796
ulong get_form_pos(int file, unsigned char *head, TYPELIB *save_names);
839
797
void append_unescaped(String *res, const char *pos, uint32_t length);
841
DRIZZLED_API int rename_file_ext(const char * from,const char * to,const char * ext);
842
799
bool check_column_name(const char *name);
843
bool check_db_name(Session *session, identifier::Schema &schema);
844
800
bool check_table_name(const char *name, uint32_t length);
846
802
} /* namespace drizzled */
848
#include "drizzled/table/singular.h"
849
#include "drizzled/table/concurrent.h"
804
#include <drizzled/table/singular.h>
805
#include <drizzled/table/concurrent.h>
851
#endif /* DRIZZLED_TABLE_H */