~drizzle-trunk/drizzle/development

243.1.5 by Jay Pipes
* Pulled the remainder of the log and parse stuff out into
1
/* Copyright (C) 2000-2003 MySQL AB
2
3
   This program is free software; you can redistribute it and/or modify
4
   it under the terms of the GNU General Public License as published by
5
   the Free Software Foundation; version 2 of the License.
6
7
   This program is distributed in the hope that it will be useful,
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
   GNU General Public License for more details.
11
12
   You should have received a copy of the GNU General Public License
13
   along with this program; if not, write to the Free Software
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
16
#ifndef DRIZZLE_SERVER_SQL_PARSE_H
17
#define DRIZZLE_SERVER_SQL_PARSE_H
18
19
bool begin_trans(THD *thd);
20
bool end_active_trans(THD *thd);
21
int end_trans(THD *thd, enum enum_mysql_completiontype completion);
22
23
bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables);
24
bool multi_update_precheck(THD *thd, TABLE_LIST *tables);
25
bool multi_delete_precheck(THD *thd, TABLE_LIST *tables);
26
int mysql_multi_update_prepare(THD *thd);
27
int mysql_multi_delete_prepare(THD *thd);
28
bool mysql_insert_select_prepare(THD *thd);
29
bool update_precheck(THD *thd, TABLE_LIST *tables);
30
bool delete_precheck(THD *thd, TABLE_LIST *tables);
31
bool insert_precheck(THD *thd, TABLE_LIST *tables);
32
bool create_table_precheck(THD *thd, TABLE_LIST *tables,
33
                           TABLE_LIST *create_table);
34
bool parse_sql(THD *thd,
35
               class Lex_input_stream *lip,
36
               class Object_creation_ctx *creation_ctx);
37
38
Item *negate_expression(THD *thd, Item *expr);
39
40
bool test_if_data_home_dir(const char *dir);
41
42
bool check_identifier_name(LEX_STRING *str, uint max_char_length,
43
                           uint err_code, const char *param_for_err_msg);
44
inline bool check_identifier_name(LEX_STRING *str, uint err_code)
45
{
46
  return check_identifier_name(str, NAME_CHAR_LEN, err_code, "");
47
}
48
inline bool check_identifier_name(LEX_STRING *str)
49
{
50
  return check_identifier_name(str, NAME_CHAR_LEN, 0, "");
51
}
52
53
bool check_string_byte_length(LEX_STRING *str, const char *err_msg,
54
                              uint max_byte_length);
55
bool check_string_char_length(LEX_STRING *str, const char *err_msg,
56
                              uint max_char_length, CHARSET_INFO *cs,
57
                              bool no_error);
58
59
#endif /* DRIZZLE_SERVER_SQL_PARSE_H */