~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.h

  • Committer: Brian Aker
  • Date: 2008-10-12 01:59:02 UTC
  • Revision ID: brian@tangent.org-20081012015902-prhy6wsimdqr28om
Dead code around unsigned (first pass)

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 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
 
#include "drizzled/identifier.h"
28
 
 
29
 
namespace drizzled
30
 
{
31
 
 
32
 
class Session;
33
 
class TableList;
34
 
class Lex_input_stream;
35
 
class Item;
36
 
class LEX;
37
 
class Table_ident;
38
 
class Select_Lex;
39
 
 
40
 
typedef struct charset_info_st CHARSET_INFO;
41
 
 
42
 
extern const LEX_STRING command_name[];
43
 
 
44
 
bool execute_sqlcom_select(Session *session, TableList *all_tables);
45
 
bool mysql_insert_select_prepare(Session *session);
46
 
bool update_precheck(Session *session, TableList *tables);
47
 
bool delete_precheck(Session *session, TableList *tables);
48
 
bool insert_precheck(Session *session, TableList *tables);
49
 
 
50
 
Item *negate_expression(Session *session, Item *expr);
51
 
 
52
 
bool check_identifier_name(LEX_STRING *str, uint32_t err_code= 0,
53
 
                           uint32_t max_char_length= NAME_CHAR_LEN,
54
 
                           const char *param_for_err_msg= "");
 
20
#ifndef DRIZZLE_SERVER_SQL_PARSE_H
 
21
#define DRIZZLE_SERVER_SQL_PARSE_H
 
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,
 
37
                           TableList *create_table);
 
38
bool parse_sql(THD *thd, class Lex_input_stream *lip);
 
39
 
 
40
Item *negate_expression(THD *thd, Item *expr);
 
41
 
 
42
bool test_if_data_home_dir(const char *dir);
 
43
 
 
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
}
55
54
 
56
55
bool check_string_byte_length(LEX_STRING *str, const char *err_msg,
57
56
                              uint32_t max_byte_length);
59
58
                              uint32_t max_char_length, const CHARSET_INFO * const cs,
60
59
                              bool no_error);
61
60
 
62
 
 
63
 
bool mysql_test_parse_for_slave(Session *session, char *inBuf,
64
 
                                uint32_t length);
65
 
 
66
 
void mysql_reset_session_for_next_command(Session *session);
67
 
 
68
 
void create_select_for_variable(const char *var_name);
69
 
 
70
 
void init_update_queries(void);
71
 
 
72
 
bool dispatch_command(enum enum_server_command command, Session *session,
73
 
                      char* packet, uint32_t packet_length);
74
 
 
75
 
bool check_simple_select();
76
 
 
77
 
void mysql_init_select(LEX *lex);
78
 
bool mysql_new_select(LEX *lex, bool move_down);
79
 
 
80
 
int prepare_new_schema_table(Session *session, LEX *lex,
81
 
                             const std::string& schema_table_name);
82
 
 
83
 
Item * all_any_subquery_creator(Item *left_expr,
84
 
                                chooser_compare_func_creator cmp,
85
 
                                bool all,
86
 
                                Select_Lex *select_lex);
87
 
 
88
 
char* query_table_status(Session *session,const char *db,const char *table_name);
89
 
 
90
 
} /* namespace drizzled */
91
 
 
92
 
#endif /* DRIZZLED_SQL_PARSE_H */
 
61
#endif /* DRIZZLE_SERVER_SQL_PARSE_H */