~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.h

  • Committer: Monty Taylor
  • Date: 2010-08-12 20:27:32 UTC
  • mto: (1720.1.5 build)
  • mto: This revision was merged to the branch mainline in revision 1722.
  • Revision ID: mordred@inaugust.com-20100812202732-9kzchbkvkyki4n3u
Merged libdrizzle directly into tree.

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
{
38
32
uint32_t cached_open_tables(void);
39
33
uint32_t cached_table_definitions(void);
40
34
 
41
 
table::Cache &get_open_cache();
42
 
 
43
 
DRIZZLED_API void kill_drizzle(void);
 
35
typedef boost::unordered_multimap< TableIdentifier::Key, Table *> TableOpenCache;
 
36
typedef std::pair< TableOpenCache::const_iterator, TableOpenCache::const_iterator > TableOpenCacheRange;
 
37
 
 
38
TableOpenCache &get_open_cache();
 
39
void remove_table(Table *arg);
 
40
 
 
41
void kill_drizzle(void);
44
42
 
45
43
/* sql_base.cc */
46
44
void set_item_name(Item *item,char *pos,uint32_t length);
58
56
                               Item *default_value, Item *on_update_value,
59
57
                               LEX_STRING *comment, char *change,
60
58
                               List<String> *interval_list, CHARSET_INFO *cs);
 
59
void store_position_for_column(const char *name);
61
60
bool push_new_name_resolution_context(Session *session,
62
61
                                      TableList *left_op,
63
62
                                      TableList *right_op);
101
100
                          enum_resolution_type *resolution);
102
101
bool insert_fields(Session *session, Name_resolution_context *context,
103
102
                   const char *db_name, const char *table_name,
104
 
                   List<Item>::iterator *it, bool any_privileges);
 
103
                   List_iterator<Item> *it, bool any_privileges);
105
104
bool setup_tables(Session *session, Name_resolution_context *context,
106
105
                  List<TableList> *from_clause, TableList *tables,
107
106
                  TableList **leaves, bool select_insert);
136
135
                               const char *table_name);
137
136
TableList *unique_table(TableList *table, TableList *table_list,
138
137
                        bool check_alias= false);
 
138
void remove_db_from_cache(const SchemaIdentifier &schema_identifier);
139
139
 
140
 
/* bits for last argument to table::Cache::singleton().removeTable() */
 
140
/* bits for last argument to remove_table_from_cache() */
141
141
#define RTFC_NO_FLAG                0x0000
142
142
#define RTFC_OWNED_BY_Session_FLAG      0x0001
143
143
#define RTFC_WAIT_OTHER_THREAD_FLAG 0x0002
144
144
#define RTFC_CHECK_KILLED_FLAG      0x0004
 
145
bool remove_table_from_cache(Session *session, TableIdentifier &identifier, uint32_t flags);
145
146
 
146
147
void mem_alloc_error(size_t size);
147
148
 
155
156
                            db_name, table_name);
156
157
}
157
158
 
158
 
bool drizzle_rm_tmp_tables();
159
 
 
160
159
} /* namespace drizzled */
161
160
 
162
161
#endif /* DRIZZLED_SQL_BASE_H */