~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.h

  • Committer: Monty Taylor
  • Date: 2009-09-30 07:01:32 UTC
  • mto: This revision was merged to the branch mainline in revision 1184.
  • Revision ID: mordred@inaugust.com-20090930070132-b1ol1xu1rpajdddy
Small namespace cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLE_SERVER_SQL_PARSE_H
21
 
#define DRIZZLE_SERVER_SQL_PARSE_H
22
 
 
23
 
bool begin_trans(Session *session);
24
 
bool end_active_trans(Session *session);
25
 
int end_trans(Session *session, enum enum_mysql_completiontype completion);
 
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
 
 
28
#include "mystrings/m_ctype.h"
 
29
 
 
30
class Session;
 
31
class TableList;
 
32
class Lex_input_stream;
 
33
class Item;
 
34
class LEX;
 
35
class Table_ident;
 
36
class Select_Lex;
26
37
 
27
38
bool execute_sqlcom_select(Session *session, TableList *all_tables);
28
 
bool multi_update_precheck(Session *session, TableList *tables);
29
 
bool multi_delete_precheck(Session *session, TableList *tables);
30
 
int mysql_multi_update_prepare(Session *session);
31
 
int mysql_multi_delete_prepare(Session *session);
32
39
bool mysql_insert_select_prepare(Session *session);
33
40
bool update_precheck(Session *session, TableList *tables);
34
41
bool delete_precheck(Session *session, TableList *tables);
35
42
bool insert_precheck(Session *session, TableList *tables);
36
43
bool create_table_precheck(Session *session, TableList *tables,
37
44
                           TableList *create_table);
38
 
bool parse_sql(Session *session, class Lex_input_stream *lip);
 
45
bool parse_sql(Session *session, Lex_input_stream *lip);
39
46
 
40
47
Item *negate_expression(Session *session, Item *expr);
41
48
 
42
49
bool test_if_data_home_dir(const char *dir);
43
50
 
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
 
}
 
51
bool check_identifier_name(LEX_STRING *str, uint32_t err_code= 0,
 
52
                           uint32_t max_char_length= NAME_CHAR_LEN,
 
53
                           const char *param_for_err_msg= "");
54
54
 
55
55
bool check_string_byte_length(LEX_STRING *str, const char *err_msg,
56
56
                              uint32_t max_byte_length);
58
58
                              uint32_t max_char_length, const CHARSET_INFO * const cs,
59
59
                              bool no_error);
60
60
 
61
 
#endif /* DRIZZLE_SERVER_SQL_PARSE_H */
 
61
 
 
62
void mysql_parse(Session *session, const char *inBuf, uint32_t length,
 
63
                 const char ** semicolon);
 
64
 
 
65
bool mysql_test_parse_for_slave(Session *session, char *inBuf,
 
66
                                uint32_t length);
 
67
 
 
68
bool is_update_query(enum enum_sql_command command);
 
69
 
 
70
void mysql_reset_session_for_next_command(Session *session);
 
71
 
 
72
void create_select_for_variable(const char *var_name);
 
73
 
 
74
void init_update_queries(void);
 
75
 
 
76
bool dispatch_command(enum enum_server_command command, Session *session,
 
77
                      char* packet, uint32_t packet_length);
 
78
 
 
79
bool check_simple_select();
 
80
 
 
81
void mysql_init_select(LEX *lex);
 
82
bool mysql_new_select(LEX *lex, bool move_down);
 
83
 
 
84
int prepare_schema_table(Session *session, LEX *lex, Table_ident *table_ident,
 
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
#endif /* DRIZZLED_SQL_PARSE_H */