~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.h

  • Committer: Brian Aker
  • Date: 2009-05-15 17:06:35 UTC
  • mto: This revision was merged to the branch mainline in revision 1023.
  • Revision ID: brian@gaz-20090515170635-croy1u63a3gqdn9n
Dead convert functions for character sets.

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
 
bool begin_trans(THD *thd);
24
 
bool end_active_trans(THD *thd);
25
 
int end_trans(THD *thd, enum enum_mysql_completiontype completion);
26
 
 
27
 
bool execute_sqlcom_select(THD *thd, TableList *all_tables);
28
 
bool multi_update_precheck(THD *thd, TableList *tables);
29
 
bool multi_delete_precheck(THD *thd, TableList *tables);
30
 
int mysql_multi_update_prepare(THD *thd);
31
 
int mysql_multi_delete_prepare(THD *thd);
32
 
bool mysql_insert_select_prepare(THD *thd);
33
 
bool update_precheck(THD *thd, TableList *tables);
34
 
bool delete_precheck(THD *thd, TableList *tables);
35
 
bool insert_precheck(THD *thd, TableList *tables);
36
 
bool create_table_precheck(THD *thd, TableList *tables,
 
23
#include <stdint.h>
 
24
 
 
25
#include <drizzled/definitions.h>
 
26
#include <drizzled/common.h>
 
27
#include <drizzled/lex_string.h>
 
28
#include <drizzled/comp_creator.h>
 
29
 
 
30
#include <mystrings/m_ctype.h>
 
31
 
 
32
class Session;
 
33
class TableList;
 
34
class Lex_input_stream;
 
35
class Item;
 
36
class LEX;
 
37
class Table_ident;
 
38
 
 
39
typedef class Select_Lex Select_Lex;
 
40
 
 
41
bool execute_sqlcom_select(Session *session, TableList *all_tables);
 
42
bool multi_update_precheck(Session *session, TableList *tables);
 
43
bool multi_delete_precheck(Session *session, TableList *tables);
 
44
int mysql_multi_update_prepare(Session *session);
 
45
int mysql_multi_delete_prepare(Session *session);
 
46
bool mysql_insert_select_prepare(Session *session);
 
47
bool update_precheck(Session *session, TableList *tables);
 
48
bool delete_precheck(Session *session, TableList *tables);
 
49
bool insert_precheck(Session *session, TableList *tables);
 
50
bool create_table_precheck(Session *session, TableList *tables,
37
51
                           TableList *create_table);
38
 
bool parse_sql(THD *thd, class Lex_input_stream *lip);
 
52
bool parse_sql(Session *session, Lex_input_stream *lip);
39
53
 
40
 
Item *negate_expression(THD *thd, Item *expr);
 
54
Item *negate_expression(Session *session, Item *expr);
41
55
 
42
56
bool test_if_data_home_dir(const char *dir);
43
57
 
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
 
}
 
58
bool check_identifier_name(LEX_STRING *str, uint32_t err_code= 0,
 
59
                           uint32_t max_char_length= NAME_CHAR_LEN,
 
60
                           const char *param_for_err_msg= "");
54
61
 
55
62
bool check_string_byte_length(LEX_STRING *str, const char *err_msg,
56
63
                              uint32_t max_byte_length);
58
65
                              uint32_t max_char_length, const CHARSET_INFO * const cs,
59
66
                              bool no_error);
60
67
 
 
68
 
 
69
void mysql_parse(Session *session, const char *inBuf, uint32_t length,
 
70
                 const char ** semicolon);
 
71
 
 
72
bool mysql_test_parse_for_slave(Session *session, char *inBuf,
 
73
                                uint32_t length);
 
74
 
 
75
bool is_update_query(enum enum_sql_command command);
 
76
 
 
77
void mysql_reset_session_for_next_command(Session *session);
 
78
 
 
79
void create_select_for_variable(const char *var_name);
 
80
 
 
81
void mysql_init_multi_delete(LEX *lex);
 
82
 
 
83
bool multi_delete_set_locks_and_link_aux_tables(LEX *lex);
 
84
 
 
85
void init_update_queries(void);
 
86
 
 
87
bool dispatch_command(enum enum_server_command command, Session *session,
 
88
                      char* packet, uint32_t packet_length);
 
89
 
 
90
void log_slow_statement(Session *session);
 
91
 
 
92
bool append_file_to_dir(Session *session, const char **filename_ptr,
 
93
                        const char *table_name);
 
94
 
 
95
bool reload_cache(Session *session, ulong options, TableList *tables);
 
96
 
 
97
bool check_simple_select();
 
98
 
 
99
void mysql_init_select(LEX *lex);
 
100
bool mysql_new_select(LEX *lex, bool move_down);
 
101
 
 
102
int prepare_schema_table(Session *session, LEX *lex, Table_ident *table_ident,
 
103
                         enum enum_schema_tables schema_table_idx);
 
104
 
 
105
Item * all_any_subquery_creator(Item *left_expr,
 
106
                                chooser_compare_func_creator cmp,
 
107
                                bool all,
 
108
                                Select_Lex *select_lex);
 
109
 
61
110
#endif /* DRIZZLE_SERVER_SQL_PARSE_H */