00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #pragma once
00024
00025 #include <drizzled/base.h>
00026 #include <drizzled/definitions.h>
00027 #include <drizzled/lex_string.h>
00028 #include <drizzled/thr_lock.h>
00029
00030 namespace drizzled
00031 {
00032
00033 namespace internal
00034 {
00035 typedef struct st_io_cache IO_CACHE;
00036 }
00037
00038 class Table;
00039 class Field;
00040
00041 class KeyPartInfo
00042 {
00043 public:
00044 Field *field;
00045 unsigned int offset;
00046 unsigned int null_offset;
00047
00048 uint16_t length;
00049
00050
00051
00052
00053
00054
00055
00056
00057 uint16_t store_length;
00058 uint16_t key_type;
00059 private:
00060 public:
00061 uint16_t getKeyType() const
00062 {
00063 return key_type;
00064 }
00065 uint16_t fieldnr;
00066 uint16_t key_part_flag;
00067 uint8_t type;
00068 uint8_t null_bit;
00069 };
00070
00071
00072 class KeyInfo
00073 {
00074 public:
00075 unsigned int key_length;
00076 enum ha_key_alg algorithm;
00077 unsigned long flags;
00078 unsigned int key_parts;
00079 uint32_t extra_length;
00080 unsigned int usable_key_parts;
00081 uint32_t block_size;
00082 KeyPartInfo *key_part;
00083 char *name;
00084
00085
00086
00087
00088
00089 ulong *rec_per_key;
00090 Table *table;
00091 LEX_STRING comment;
00092 };
00093
00094
00095 class JoinTable;
00096
00097 class RegInfo
00098 {
00099 public:
00100 JoinTable *join_tab;
00101 enum thr_lock_type lock_type;
00102 bool not_exists_optimize;
00103 bool impossible_range;
00104 RegInfo()
00105 : join_tab(NULL), lock_type(TL_UNLOCK),
00106 not_exists_optimize(false), impossible_range(false) {}
00107 void reset()
00108 {
00109 join_tab= NULL;
00110 lock_type= TL_UNLOCK;
00111 not_exists_optimize= false;
00112 impossible_range= false;
00113 }
00114 };
00115
00116 class Session;
00117 class Cursor;
00118 namespace optimizer { class SqlSelect; }
00119
00120 typedef int *(*update_var)(Session *, struct drizzle_show_var *);
00121
00122 }
00123
00124
00125 #define STATUS_NO_RECORD (1+2)
00126 #define STATUS_GARBAGE 1
00127 #define STATUS_NOT_FOUND 2
00128 #define STATUS_NO_PARENT 4
00129 #define STATUS_NULL_ROW 32
00130