~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.h

  • Committer: Monty Taylor
  • Date: 2008-10-16 06:32:30 UTC
  • mto: (511.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 521.
  • Revision ID: monty@inaugust.com-20081016063230-4brxsra0qsmsg84q
Added -Wunused-macros.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Copyright (C) 2008 Sun Microsystems
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; version 2 of the License.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 */
 
19
 
 
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
}
 
54
 
 
55
bool check_string_byte_length(LEX_STRING *str, const char *err_msg,
 
56
                              uint32_t max_byte_length);
 
57
bool check_string_char_length(LEX_STRING *str, const char *err_msg,
 
58
                              uint32_t max_char_length, const CHARSET_INFO * const cs,
 
59
                              bool no_error);
 
60
 
 
61
#endif /* DRIZZLE_SERVER_SQL_PARSE_H */