~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.h

  • Committer: Brian Aker
  • Date: 2008-07-20 05:41:52 UTC
  • Revision ID: brian@tangent.org-20080720054152-5laf6plsb0o7h6ss
Documentation cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
5
 
 *
6
 
 *  This program is free software; you can redistribute it and/or modify
7
 
 *  it under the terms of the GNU General Public License as published by
8
 
 *  the Free Software Foundation; version 2 of the License.
9
 
 *
10
 
 *  This program is distributed in the hope that it will be useful,
11
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 *  GNU General Public License for more details.
14
 
 *
15
 
 *  You should have received a copy of the GNU General Public License
16
 
 *  along with this program; if not, write to the Free Software
17
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
 
 */
19
 
 
20
 
#ifndef DRIZZLED_SQL_PARSE_H
21
 
#define DRIZZLED_SQL_PARSE_H
22
 
 
23
 
#include "drizzled/definitions.h"
24
 
#include "drizzled/common.h"
25
 
#include "drizzled/lex_string.h"
26
 
#include "drizzled/comp_creator.h"
27
 
#include "drizzled/table_identifier.h"
28
 
 
29
 
namespace drizzled
30
 
{
31
 
 
32
 
class Session;
33
 
class TableList;
34
 
class Lex_input_stream;
35
 
class Item;
36
 
class LEX;
37
 
class Table_ident;
38
 
class Select_Lex;
39
 
 
40
 
typedef struct charset_info_st CHARSET_INFO;
41
 
 
42
 
extern const LEX_STRING command_name[];
43
 
 
44
 
bool execute_sqlcom_select(Session *session, TableList *all_tables);
45
 
bool mysql_insert_select_prepare(Session *session);
46
 
bool update_precheck(Session *session, TableList *tables);
47
 
bool delete_precheck(Session *session, TableList *tables);
48
 
bool insert_precheck(Session *session, TableList *tables);
49
 
bool create_table_precheck(TableIdentifier &identifier);
50
 
 
51
 
Item *negate_expression(Session *session, Item *expr);
52
 
 
53
 
bool check_identifier_name(LEX_STRING *str, uint32_t err_code= 0,
54
 
                           uint32_t max_char_length= NAME_CHAR_LEN,
55
 
                           const char *param_for_err_msg= "");
56
 
 
57
 
bool check_string_byte_length(LEX_STRING *str, const char *err_msg,
58
 
                              uint32_t max_byte_length);
59
 
bool check_string_char_length(LEX_STRING *str, const char *err_msg,
60
 
                              uint32_t max_char_length, const CHARSET_INFO * const cs,
61
 
                              bool no_error);
62
 
 
63
 
 
64
 
bool mysql_test_parse_for_slave(Session *session, char *inBuf,
65
 
                                uint32_t length);
66
 
 
67
 
void mysql_reset_session_for_next_command(Session *session);
68
 
 
69
 
void create_select_for_variable(const char *var_name);
70
 
 
71
 
void init_update_queries(void);
72
 
 
73
 
bool dispatch_command(enum enum_server_command command, Session *session,
74
 
                      char* packet, uint32_t packet_length);
75
 
 
76
 
bool check_simple_select();
77
 
 
78
 
void mysql_init_select(LEX *lex);
79
 
bool mysql_new_select(LEX *lex, bool move_down);
80
 
 
81
 
int prepare_schema_table(Session *session, LEX *lex, Table_ident *table_ident,
82
 
                         const std::string& schema_table_name);
83
 
 
84
 
int prepare_new_schema_table(Session *session, LEX *lex,
85
 
                             const std::string& schema_table_name);
86
 
 
87
 
Item * all_any_subquery_creator(Item *left_expr,
88
 
                                chooser_compare_func_creator cmp,
89
 
                                bool all,
90
 
                                Select_Lex *select_lex);
91
 
 
92
 
void sql_kill(Session *session, unsigned long id, bool only_kill_query);
93
 
char* query_table_status(Session *session,const char *db,const char *table_name);
94
 
 
95
 
} /* namespace drizzled */
96
 
 
97
 
#endif /* DRIZZLED_SQL_PARSE_H */