~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.h

add extra information to backtraces - full strings + potential location of crash

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, Inc.
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
 
#pragma once
21
 
 
22
 
#include <string>
23
 
 
24
 
#include <drizzled/definitions.h>
25
 
#include <drizzled/common.h>
26
 
#include <drizzled/lex_string.h>
27
 
#include <drizzled/comp_creator.h>
28
 
#include <drizzled/identifier.h>
29
 
 
30
 
#include <drizzled/error_t.h>
31
 
#include <drizzled/visibility.h>
32
 
 
33
 
namespace drizzled {
34
 
 
35
 
DRIZZLED_API const std::string &getCommandName(const enum_server_command& command);
36
 
 
37
 
bool execute_sqlcom_select(Session *session, TableList *all_tables);
38
 
bool insert_select_prepare(Session *session);
39
 
bool update_precheck(Session *session, TableList *tables);
40
 
bool delete_precheck(Session *session, TableList *tables);
41
 
bool insert_precheck(Session *session, TableList *tables);
42
 
 
43
 
Item *negate_expression(Session *session, Item *expr);
44
 
 
45
 
bool check_identifier_name(lex_string_t *str, error_t err_code= EE_OK,
46
 
                           uint32_t max_char_length= NAME_CHAR_LEN,
47
 
                           const char *param_for_err_msg= "");
48
 
 
49
 
bool check_string_byte_length(lex_string_t *str, const char *err_msg,
50
 
                              uint32_t max_byte_length);
51
 
bool check_string_char_length(lex_string_t *str, const char *err_msg,
52
 
                              uint32_t max_char_length, const charset_info_st * const cs,
53
 
                              bool no_error);
54
 
 
55
 
 
56
 
bool test_parse_for_slave(Session *session, char *inBuf,
57
 
                                uint32_t length);
58
 
 
59
 
void reset_session_for_next_command(Session *session);
60
 
 
61
 
void create_select_for_variable(Session *session, const char *var_name);
62
 
 
63
 
void init_update_queries(void);
64
 
 
65
 
bool dispatch_command(enum enum_server_command command, Session* session,
66
 
                      const char* packet, uint32_t packet_length);
67
 
 
68
 
bool check_simple_select(Session* session);
69
 
 
70
 
void init_select(LEX *lex);
71
 
bool new_select(LEX *lex, bool move_down);
72
 
 
73
 
int prepare_new_schema_table(Session*, LEX&, const std::string& schema_table_name);
74
 
 
75
 
Item * all_any_subquery_creator(Item *left_expr,
76
 
                                chooser_compare_func_creator cmp,
77
 
                                bool all,
78
 
                                Select_Lex *select_lex);
79
 
 
80
 
char* query_table_status(Session *session,const char *db,const char *table_name);
81
 
 
82
 
} /* namespace drizzled */
83