~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cursor.h

  • Committer: Olaf van der Spek
  • Date: 2011-07-04 19:11:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: olafvdspek@gmail.com-20110704191147-s99ojek811zi1fzj
RemoveĀ unusedĀ Name_resolution_context::error_reporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_CURSOR_H
21
 
#define DRIZZLED_CURSOR_H
 
20
#pragma once
22
21
 
23
 
#include <drizzled/xid.h>
 
22
#include <drizzled/atomics.h>
 
23
#include <drizzled/definitions.h>
24
24
#include <drizzled/discrete_interval.h>
 
25
#include <drizzled/error_t.h>
 
26
#include <drizzled/ha_statistics.h>
 
27
#include <drizzled/handler_structs.h>
25
28
#include <drizzled/identifier.h>
26
 
#include <drizzled/definitions.h>
27
29
#include <drizzled/key_map.h>
28
 
#include <drizzled/error_t.h>
29
 
 
30
 
/* Definitions for parameters to do with Cursor-routines */
31
 
 
 
30
#include <drizzled/message/table.h>
 
31
#include <drizzled/sql_list.h>
32
32
#include <drizzled/thr_lock.h>
33
 
#include <drizzled/sql_list.h>
34
 
#include <drizzled/handler_structs.h>
35
 
#include <drizzled/ha_statistics.h>
36
 
#include <drizzled/atomics.h>
37
 
 
38
 
#include <drizzled/message/table.h>
39
33
 
40
34
#include <bitset>
41
35
#include <algorithm>
42
36
 
43
 
#include "drizzled/visibility.h"
 
37
#include <drizzled/visibility.h>
44
38
 
45
 
namespace drizzled
46
 
{
 
39
namespace drizzled {
47
40
 
48
41
#define HA_MAX_ALTER_FLAGS 40
49
42
 
50
43
typedef std::bitset<HA_MAX_ALTER_FLAGS> HA_ALTER_FLAGS;
51
44
 
52
 
class AlterInfo;
53
 
class CreateField;
54
 
class ForeignKeyInfo;
55
 
class Item;
56
 
class Item_ident;
57
 
class LEX;
58
 
class Select_Lex;
59
 
class Select_Lex_Unit;
60
 
class String;
61
 
class Table;
62
 
class TableList;
63
 
class TableShare;
64
 
class select_result;
65
 
class sys_var_str;
66
 
struct Order;
67
 
 
68
45
typedef List<Item> List_item;
69
46
extern KEY_CREATE_INFO default_key_create_info;
70
47
 
71
 
/* Forward declaration for condition pushdown to storage engine */
72
 
typedef class Item COND;
73
 
 
74
 
typedef struct system_status_var system_status_var;
75
 
 
76
 
namespace optimizer { class CostVector; }
77
 
namespace plugin { class StorageEngine; }
78
 
 
79
48
/*
80
49
  bitmap with first N+1 bits set
81
50
  (keypart_map for a key prefix of [0..N] keyparts)
82
51
*/
83
 
template<class T>
84
 
inline key_part_map make_keypart_map(T a)
 
52
inline key_part_map make_keypart_map(int a)
85
53
{
86
54
  return (((key_part_map)2 << a) - 1);
87
55
}
90
58
  bitmap with first N bits set
91
59
  (keypart_map for a key prefix of [0..N-1] keyparts)
92
60
*/
93
 
template<class T>
94
 
inline key_part_map make_prev_keypart_map(T a)
 
61
inline key_part_map make_prev_keypart_map(int a)
95
62
{
96
63
  return (((key_part_map)1 << a) - 1);
97
64
}
258
225
  void ha_release_auto_increment();
259
226
 
260
227
  /** to be actually called to get 'check()' functionality*/
261
 
  int ha_check(Session *session, HA_CHECK_OPT *check_opt);
 
228
  int ha_check(Session*);
262
229
 
263
230
  void ha_start_bulk_insert(ha_rows rows);
264
231
  int ha_end_bulk_insert();
265
232
  int ha_delete_all_rows();
266
233
  int ha_reset_auto_increment(uint64_t value);
267
 
  int ha_analyze(Session* session, HA_CHECK_OPT* check_opt);
 
234
  int ha_analyze(Session*);
268
235
 
269
236
  int ha_disable_indexes(uint32_t mode);
270
237
  int ha_enable_indexes(uint32_t mode);
276
243
 
277
244
  /* Estimates calculation */
278
245
  virtual double scan_time(void)
279
 
  { return uint64_t2double(stats.data_file_length) / IO_SIZE + 2; }
 
246
  { return static_cast<double>(stats.data_file_length) / IO_SIZE + 2; }
280
247
  virtual double read_time(uint32_t, uint32_t ranges, ha_rows rows)
281
 
  { return rows2double(ranges+rows); }
 
248
  { return ranges + rows; }
282
249
 
283
250
  virtual double index_only_read_time(uint32_t keynr, double records);
284
251
 
644
611
/* basic stuff */
645
612
void ha_init_errors(void);
646
613
 
647
 
class SortField;
648
614
SortField *make_unireg_sortorder(Order *order, uint32_t *length,
649
615
                                 SortField *sortorder);
650
616
int setup_order(Session *session, Item **ref_pointer_array, TableList *tables,
685
651
                          bool is_if_not_exists);
686
652
 
687
653
bool create_like_table(Session* session,
688
 
                       identifier::Table::const_reference destination_identifier,
689
 
                       identifier::Table::const_reference source_identifier,
 
654
                       const identifier::Table& destination_identifier,
 
655
                       const identifier::Table& source_identifier,
690
656
                       message::Table &create_table_proto,
691
657
                       bool is_if_not_exists,
692
658
                       bool is_engine_set);
751
717
 
752
718
} /* namespace drizzled */
753
719
 
754
 
#endif /* DRIZZLED_CURSOR_H */