~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.h

  • Committer: Olaf van der Spek
  • Date: 2011-02-12 18:24:24 UTC
  • mto: (2167.1.2 build) (2172.1.4 build)
  • mto: This revision was merged to the branch mainline in revision 2168.
  • Revision ID: olafvdspek@gmail.com-20110212182424-kgnm9osi7qo97at2
casts

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/concurrent.h>
 
27
 
 
28
#include "drizzled/visibility.h"
24
29
 
25
30
namespace drizzled
26
31
{
31
36
bool table_cache_init(void);
32
37
uint32_t cached_open_tables(void);
33
38
uint32_t cached_table_definitions(void);
34
 
HASH *get_open_cache();
35
 
 
36
 
void kill_drizzle(void);
 
39
 
 
40
table::Cache &get_open_cache();
 
41
 
 
42
DRIZZLED_API void kill_drizzle(void);
37
43
 
38
44
/* sql_base.cc */
39
45
void set_item_name(Item *item,char *pos,uint32_t length);
51
57
                               Item *default_value, Item *on_update_value,
52
58
                               LEX_STRING *comment, char *change,
53
59
                               List<String> *interval_list, CHARSET_INFO *cs);
54
 
void store_position_for_column(const char *name);
55
60
bool push_new_name_resolution_context(Session *session,
56
61
                                      TableList *left_op,
57
62
                                      TableList *right_op);
89
94
  RESOLVED_WITH_NO_ALIAS,
90
95
  RESOLVED_AGAINST_ALIAS
91
96
};
92
 
Item ** find_item_in_list(Item *item, List<Item> &items, uint32_t *counter,
 
97
Item ** find_item_in_list(Session *session,
 
98
                          Item *item, List<Item> &items, uint32_t *counter,
93
99
                          find_item_error_report_type report_error,
94
100
                          enum_resolution_type *resolution);
95
101
bool insert_fields(Session *session, Name_resolution_context *context,
129
135
                               const char *table_name);
130
136
TableList *unique_table(TableList *table, TableList *table_list,
131
137
                        bool check_alias= false);
132
 
void remove_db_from_cache(SchemaIdentifier &schema_identifier);
133
138
 
134
 
/* bits for last argument to remove_table_from_cache() */
 
139
/* bits for last argument to table::Cache::singleton().removeTable() */
135
140
#define RTFC_NO_FLAG                0x0000
136
141
#define RTFC_OWNED_BY_Session_FLAG      0x0001
137
142
#define RTFC_WAIT_OTHER_THREAD_FLAG 0x0002
138
143
#define RTFC_CHECK_KILLED_FLAG      0x0004
139
 
bool remove_table_from_cache(Session *session, const char *db, const char *table,
140
 
                             uint32_t flags);
141
144
 
142
145
void mem_alloc_error(size_t size);
143
146