00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #pragma once
00021
00022 #include <string>
00023
00024 #include <drizzled/definitions.h>
00025 #include <drizzled/common.h>
00026 #include <drizzled/lex_string.h>
00027 #include <drizzled/comp_creator.h>
00028 #include <drizzled/identifier.h>
00029
00030 #include <drizzled/error_t.h>
00031 #include <drizzled/visibility.h>
00032
00033 namespace drizzled
00034 {
00035
00036 class Session;
00037 class TableList;
00038 class Lex_input_stream;
00039 class Item;
00040 class LEX;
00041 class Table_ident;
00042 class Select_Lex;
00043
00044 typedef struct charset_info_st CHARSET_INFO;
00045
00046 DRIZZLED_API const std::string &getCommandName(const enum_server_command& command);
00047
00048 bool execute_sqlcom_select(Session *session, TableList *all_tables);
00049 bool insert_select_prepare(Session *session);
00050 bool update_precheck(Session *session, TableList *tables);
00051 bool delete_precheck(Session *session, TableList *tables);
00052 bool insert_precheck(Session *session, TableList *tables);
00053
00054 Item *negate_expression(Session *session, Item *expr);
00055
00056 bool check_identifier_name(LEX_STRING *str, error_t err_code= EE_OK,
00057 uint32_t max_char_length= NAME_CHAR_LEN,
00058 const char *param_for_err_msg= "");
00059
00060 bool check_string_byte_length(LEX_STRING *str, const char *err_msg,
00061 uint32_t max_byte_length);
00062 bool check_string_char_length(LEX_STRING *str, const char *err_msg,
00063 uint32_t max_char_length, const CHARSET_INFO * const cs,
00064 bool no_error);
00065
00066
00067 bool test_parse_for_slave(Session *session, char *inBuf,
00068 uint32_t length);
00069
00070 void reset_session_for_next_command(Session *session);
00071
00072 void create_select_for_variable(Session *session, const char *var_name);
00073
00074 void init_update_queries(void);
00075
00076 bool dispatch_command(enum enum_server_command command, Session *session,
00077 char* packet, uint32_t packet_length);
00078
00079 bool check_simple_select(Session* session);
00080
00081 void init_select(LEX *lex);
00082 bool new_select(LEX *lex, bool move_down);
00083
00084 int prepare_new_schema_table(Session*, LEX&, const std::string& schema_table_name);
00085
00086 Item * all_any_subquery_creator(Item *left_expr,
00087 chooser_compare_func_creator cmp,
00088 bool all,
00089 Select_Lex *select_lex);
00090
00091 char* query_table_status(Session *session,const char *db,const char *table_name);
00092
00093 }
00094