~drizzle-trunk/drizzle/development

390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
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
 */
243.1.5 by Jay Pipes
* Pulled the remainder of the log and parse stuff out into
19
20
#ifndef DRIZZLE_SERVER_SQL_PARSE_H
21
#define DRIZZLE_SERVER_SQL_PARSE_H
22
575.4.7 by Monty Taylor
More header cleanup.
23
#include <stdint.h>
24
25
#include <drizzled/definitions.h>
26
#include <drizzled/common.h>
27
#include <drizzled/lex_string.h>
28
29
#include <mystrings/m_ctype.h>
30
31
class Session;
32
class TableList;
33
class Lex_input_stream;
34
class Item;
35
class LEX;
584.1.1 by Monty Taylor
Moved an enum def to fix Lee's problem.
36
class Table_ident;
575.4.7 by Monty Taylor
More header cleanup.
37
38
520.1.22 by Brian Aker
Second pass of thd cleanup
39
bool begin_trans(Session *session);
40
bool end_active_trans(Session *session);
41
int end_trans(Session *session, enum enum_mysql_completiontype completion);
243.1.5 by Jay Pipes
* Pulled the remainder of the log and parse stuff out into
42
520.1.22 by Brian Aker
Second pass of thd cleanup
43
bool execute_sqlcom_select(Session *session, TableList *all_tables);
44
bool multi_update_precheck(Session *session, TableList *tables);
45
bool multi_delete_precheck(Session *session, TableList *tables);
46
int mysql_multi_update_prepare(Session *session);
47
int mysql_multi_delete_prepare(Session *session);
48
bool mysql_insert_select_prepare(Session *session);
49
bool update_precheck(Session *session, TableList *tables);
50
bool delete_precheck(Session *session, TableList *tables);
51
bool insert_precheck(Session *session, TableList *tables);
52
bool create_table_precheck(Session *session, TableList *tables,
327.2.4 by Brian Aker
Refactoring table.h
53
                           TableList *create_table);
575.4.7 by Monty Taylor
More header cleanup.
54
bool parse_sql(Session *session, Lex_input_stream *lip);
243.1.5 by Jay Pipes
* Pulled the remainder of the log and parse stuff out into
55
520.1.22 by Brian Aker
Second pass of thd cleanup
56
Item *negate_expression(Session *session, Item *expr);
243.1.5 by Jay Pipes
* Pulled the remainder of the log and parse stuff out into
57
58
bool test_if_data_home_dir(const char *dir);
59
575.4.7 by Monty Taylor
More header cleanup.
60
bool check_identifier_name(LEX_STRING *str, uint32_t err_code= 0,
61
                           uint32_t max_char_length= NAME_CHAR_LEN,
62
                           const char *param_for_err_msg= "");
243.1.5 by Jay Pipes
* Pulled the remainder of the log and parse stuff out into
63
64
bool check_string_byte_length(LEX_STRING *str, const char *err_msg,
482 by Brian Aker
Remove uint.
65
                              uint32_t max_byte_length);
243.1.5 by Jay Pipes
* Pulled the remainder of the log and parse stuff out into
66
bool check_string_char_length(LEX_STRING *str, const char *err_msg,
482 by Brian Aker
Remove uint.
67
                              uint32_t max_char_length, const CHARSET_INFO * const cs,
243.1.5 by Jay Pipes
* Pulled the remainder of the log and parse stuff out into
68
                              bool no_error);
69
575.4.7 by Monty Taylor
More header cleanup.
70
71
void mysql_parse(Session *session, const char *inBuf, uint32_t length,
72
                 const char ** semicolon);
73
74
bool mysql_test_parse_for_slave(Session *session, char *inBuf,
75
                                uint32_t length);
76
77
bool is_update_query(enum enum_sql_command command);
78
79
bool alloc_query(Session *session, const char *packet, uint32_t packet_length);
80
81
void mysql_reset_session_for_next_command(Session *session);
82
83
void create_select_for_variable(const char *var_name);
84
85
void mysql_init_multi_delete(LEX *lex);
86
87
bool multi_delete_set_locks_and_link_aux_tables(LEX *lex);
88
89
void init_update_queries(void);
90
91
bool do_command(Session *session);
92
93
bool dispatch_command(enum enum_server_command command, Session *session,
94
                      char* packet, uint32_t packet_length);
95
96
void log_slow_statement(Session *session);
97
98
bool append_file_to_dir(Session *session, const char **filename_ptr,
99
                        const char *table_name);
100
101
bool reload_cache(Session *session, ulong options, TableList *tables,
102
                  bool *write_to_binlog);
103
104
bool check_simple_select();
105
106
void mysql_init_select(LEX *lex);
107
bool mysql_new_select(LEX *lex, bool move_down);
108
109
int prepare_schema_table(Session *session, LEX *lex, Table_ident *table_ident,
110
                         enum enum_schema_tables schema_table_idx);
111
112
243.1.5 by Jay Pipes
* Pulled the remainder of the log and parse stuff out into
113
#endif /* DRIZZLE_SERVER_SQL_PARSE_H */