~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.h

  • Committer: Brian Aker
  • Date: 2010-06-02 17:48:07 UTC
  • mto: (1578.6.10 explain-drizzle)
  • mto: This revision was merged to the branch mainline in revision 1589.
  • Revision ID: brian@gir-2.local-20100602174807-9unmrwp18ewkwol5
Modify merge-buffer to use std::vector in one location (just curious to see
if this shows up on benchmarks).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
 
21
 
 
22
20
#ifndef DRIZZLED_SQL_BASE_H
23
21
#define DRIZZLED_SQL_BASE_H
24
22
 
25
23
#include <drizzled/table.h>
26
 
#include <drizzled/table_list.h>
27
 
#include <drizzled/table/concurrent.h>
28
 
 
29
 
#include <drizzled/visibility.h>
30
24
 
31
25
namespace drizzled
32
26
{
37
31
bool table_cache_init(void);
38
32
uint32_t cached_open_tables(void);
39
33
uint32_t cached_table_definitions(void);
40
 
 
41
 
table::Cache &get_open_cache();
42
 
 
43
 
DRIZZLED_API void kill_drizzle(void);
 
34
HASH *get_open_cache();
 
35
 
 
36
void kill_drizzle(void);
44
37
 
45
38
/* sql_base.cc */
46
39
void set_item_name(Item *item,char *pos,uint32_t length);
58
51
                               Item *default_value, Item *on_update_value,
59
52
                               LEX_STRING *comment, char *change,
60
53
                               List<String> *interval_list, CHARSET_INFO *cs);
 
54
void store_position_for_column(const char *name);
61
55
bool push_new_name_resolution_context(Session *session,
62
56
                                      TableList *left_op,
63
57
                                      TableList *right_op);
95
89
  RESOLVED_WITH_NO_ALIAS,
96
90
  RESOLVED_AGAINST_ALIAS
97
91
};
98
 
Item ** find_item_in_list(Session *session,
99
 
                          Item *item, List<Item> &items, uint32_t *counter,
 
92
Item ** find_item_in_list(Item *item, List<Item> &items, uint32_t *counter,
100
93
                          find_item_error_report_type report_error,
101
94
                          enum_resolution_type *resolution);
102
95
bool insert_fields(Session *session, Name_resolution_context *context,
103
96
                   const char *db_name, const char *table_name,
104
 
                   List<Item>::iterator *it, bool any_privileges);
 
97
                   List_iterator<Item> *it, bool any_privileges);
105
98
bool setup_tables(Session *session, Name_resolution_context *context,
106
99
                  List<TableList> *from_clause, TableList *tables,
107
100
                  TableList **leaves, bool select_insert);
136
129
                               const char *table_name);
137
130
TableList *unique_table(TableList *table, TableList *table_list,
138
131
                        bool check_alias= false);
 
132
void remove_db_from_cache(SchemaIdentifier &schema_identifier);
139
133
 
140
 
/* bits for last argument to table::Cache::singleton().removeTable() */
 
134
/* bits for last argument to remove_table_from_cache() */
141
135
#define RTFC_NO_FLAG                0x0000
142
136
#define RTFC_OWNED_BY_Session_FLAG      0x0001
143
137
#define RTFC_WAIT_OTHER_THREAD_FLAG 0x0002
144
138
#define RTFC_CHECK_KILLED_FLAG      0x0004
 
139
bool remove_table_from_cache(Session *session, const char *db, const char *table,
 
140
                             uint32_t flags);
145
141
 
146
142
void mem_alloc_error(size_t size);
147
143
 
155
151
                            db_name, table_name);
156
152
}
157
153
 
158
 
bool drizzle_rm_tmp_tables();
159
 
 
160
154
} /* namespace drizzled */
161
155
 
162
156
#endif /* DRIZZLED_SQL_BASE_H */