~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.h

  • Committer: Brian Aker
  • Date: 2011-02-22 06:12:02 UTC
  • mfrom: (2190.1.6 drizzle-build)
  • Revision ID: brian@tangent.org-20110222061202-k03czxykqy4x9hjs
List update, header fixes, multiple symbols, and David deletes some code.

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