~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.h

  • Committer: Monty Taylor
  • Date: 2008-11-12 17:42:40 UTC
  • mto: This revision was merged to the branch mainline in revision 584.
  • Revision ID: monty@inaugust.com-20081112174240-l2vg9lnzbmjc3uyk
More header cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef DRIZZLE_SERVER_SQL_PARSE_H
21
21
#define DRIZZLE_SERVER_SQL_PARSE_H
22
22
 
 
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;
 
36
 
 
37
 
23
38
bool begin_trans(Session *session);
24
39
bool end_active_trans(Session *session);
25
40
int end_trans(Session *session, enum enum_mysql_completiontype completion);
35
50
bool insert_precheck(Session *session, TableList *tables);
36
51
bool create_table_precheck(Session *session, TableList *tables,
37
52
                           TableList *create_table);
38
 
bool parse_sql(Session *session, class Lex_input_stream *lip);
 
53
bool parse_sql(Session *session, Lex_input_stream *lip);
39
54
 
40
55
Item *negate_expression(Session *session, Item *expr);
41
56
 
42
57
bool test_if_data_home_dir(const char *dir);
43
58
 
44
 
bool check_identifier_name(LEX_STRING *str, uint32_t max_char_length,
45
 
                           uint32_t err_code, const char *param_for_err_msg);
46
 
inline bool check_identifier_name(LEX_STRING *str, uint32_t err_code)
47
 
{
48
 
  return check_identifier_name(str, NAME_CHAR_LEN, err_code, "");
49
 
}
50
 
inline bool check_identifier_name(LEX_STRING *str)
51
 
{
52
 
  return check_identifier_name(str, NAME_CHAR_LEN, 0, "");
53
 
}
 
59
bool check_identifier_name(LEX_STRING *str, uint32_t err_code= 0,
 
60
                           uint32_t max_char_length= NAME_CHAR_LEN,
 
61
                           const char *param_for_err_msg= "");
54
62
 
55
63
bool check_string_byte_length(LEX_STRING *str, const char *err_msg,
56
64
                              uint32_t max_byte_length);
58
66
                              uint32_t max_char_length, const CHARSET_INFO * const cs,
59
67
                              bool no_error);
60
68
 
 
69
 
 
70
void mysql_parse(Session *session, const char *inBuf, uint32_t length,
 
71
                 const char ** semicolon);
 
72
 
 
73
bool mysql_test_parse_for_slave(Session *session, char *inBuf,
 
74
                                uint32_t length);
 
75
 
 
76
bool is_update_query(enum enum_sql_command command);
 
77
 
 
78
bool alloc_query(Session *session, const char *packet, uint32_t packet_length);
 
79
 
 
80
void mysql_reset_session_for_next_command(Session *session);
 
81
 
 
82
void create_select_for_variable(const char *var_name);
 
83
 
 
84
void mysql_init_multi_delete(LEX *lex);
 
85
 
 
86
bool multi_delete_set_locks_and_link_aux_tables(LEX *lex);
 
87
 
 
88
void init_update_queries(void);
 
89
 
 
90
bool do_command(Session *session);
 
91
 
 
92
bool dispatch_command(enum enum_server_command command, Session *session,
 
93
                      char* packet, uint32_t packet_length);
 
94
 
 
95
void log_slow_statement(Session *session);
 
96
 
 
97
bool append_file_to_dir(Session *session, const char **filename_ptr,
 
98
                        const char *table_name);
 
99
 
 
100
bool reload_cache(Session *session, ulong options, TableList *tables,
 
101
                  bool *write_to_binlog);
 
102
 
 
103
bool check_simple_select();
 
104
 
 
105
void mysql_init_select(LEX *lex);
 
106
bool mysql_new_select(LEX *lex, bool move_down);
 
107
 
 
108
int prepare_schema_table(Session *session, LEX *lex, Table_ident *table_ident,
 
109
                         enum enum_schema_tables schema_table_idx);
 
110
 
 
111
 
61
112
#endif /* DRIZZLE_SERVER_SQL_PARSE_H */