~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.h

  • Committer: Monty Taylor
  • Date: 2008-09-15 17:24:04 UTC
  • Revision ID: monty@inaugust.com-20080915172404-ygh6hiyu0q7qpa9x
Removed strndup calls.

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
 
 */
 
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 */
19
15
 
20
16
#ifndef DRIZZLE_SERVER_SQL_PARSE_H
21
17
#define DRIZZLE_SERVER_SQL_PARSE_H
22
18
 
23
 
bool begin_trans(Session *session);
24
 
bool end_active_trans(Session *session);
25
 
int end_trans(Session *session, enum enum_mysql_completiontype completion);
 
19
bool begin_trans(THD *thd);
 
20
bool end_active_trans(THD *thd);
 
21
int end_trans(THD *thd, enum enum_mysql_completiontype completion);
26
22
 
27
 
bool execute_sqlcom_select(Session *session, TableList *all_tables);
28
 
bool multi_update_precheck(Session *session, TableList *tables);
29
 
bool multi_delete_precheck(Session *session, TableList *tables);
30
 
int mysql_multi_update_prepare(Session *session);
31
 
int mysql_multi_delete_prepare(Session *session);
32
 
bool mysql_insert_select_prepare(Session *session);
33
 
bool update_precheck(Session *session, TableList *tables);
34
 
bool delete_precheck(Session *session, TableList *tables);
35
 
bool insert_precheck(Session *session, TableList *tables);
36
 
bool create_table_precheck(Session *session, TableList *tables,
 
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);
 
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, 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,
37
33
                           TableList *create_table);
38
 
bool parse_sql(Session *session, class Lex_input_stream *lip);
 
34
bool parse_sql(THD *thd, class Lex_input_stream *lip);
39
35
 
40
 
Item *negate_expression(Session *session, Item *expr);
 
36
Item *negate_expression(THD *thd, Item *expr);
41
37
 
42
38
bool test_if_data_home_dir(const char *dir);
43
39
 
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)
 
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)
47
43
{
48
44
  return check_identifier_name(str, NAME_CHAR_LEN, err_code, "");
49
45
}
53
49
}
54
50
 
55
51
bool check_string_byte_length(LEX_STRING *str, const char *err_msg,
56
 
                              uint32_t max_byte_length);
 
52
                              uint max_byte_length);
57
53
bool check_string_char_length(LEX_STRING *str, const char *err_msg,
58
 
                              uint32_t max_char_length, const CHARSET_INFO * const cs,
 
54
                              uint max_char_length, const CHARSET_INFO * const cs,
59
55
                              bool no_error);
60
56
 
61
57
#endif /* DRIZZLE_SERVER_SQL_PARSE_H */