~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
327.2.4 by Brian Aker
Refactoring table.h
23
bool execute_sqlcom_select(THD *thd, TableList *all_tables);
24
bool multi_update_precheck(THD *thd, TableList *tables);
25
bool multi_delete_precheck(THD *thd, TableList *tables);
243.1.5 by Jay Pipes
* Pulled the remainder of the log and parse stuff out into
26
int mysql_multi_update_prepare(THD *thd);
27
int mysql_multi_delete_prepare(THD *thd);
28
bool mysql_insert_select_prepare(THD *thd);
327.2.4 by Brian Aker
Refactoring table.h
29
bool update_precheck(THD *thd, TableList *tables);
30
bool delete_precheck(THD *thd, TableList *tables);
31
bool insert_precheck(THD *thd, TableList *tables);
32
bool create_table_precheck(THD *thd, TableList *tables,
33
                           TableList *create_table);
320 by Brian Aker
Remove object_creation_ctx.
34
bool parse_sql(THD *thd, class Lex_input_stream *lip);
243.1.5 by Jay Pipes
* Pulled the remainder of the log and parse stuff out into
35
36
Item *negate_expression(THD *thd, Item *expr);
37
38
bool test_if_data_home_dir(const char *dir);
39
40
bool check_identifier_name(LEX_STRING *str, uint max_char_length,
41
                           uint err_code, const char *param_for_err_msg);
42
inline bool check_identifier_name(LEX_STRING *str, uint err_code)
43
{
44
  return check_identifier_name(str, NAME_CHAR_LEN, err_code, "");
45
}
46
inline bool check_identifier_name(LEX_STRING *str)
47
{
48
  return check_identifier_name(str, NAME_CHAR_LEN, 0, "");
49
}
50
51
bool check_string_byte_length(LEX_STRING *str, const char *err_msg,
52
                              uint max_byte_length);
53
bool check_string_char_length(LEX_STRING *str, const char *err_msg,
264.2.6 by Andrey Hristov
Constify the usage of CHARSET_INFO almost to the last place in the code.
54
                              uint max_char_length, const CHARSET_INFO * const cs,
243.1.5 by Jay Pipes
* Pulled the remainder of the log and parse stuff out into
55
                              bool no_error);
56
57
#endif /* DRIZZLE_SERVER_SQL_PARSE_H */