MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sql_insert.h
1 /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
15 
16 #ifndef SQL_INSERT_INCLUDED
17 #define SQL_INSERT_INCLUDED
18 
19 #include "sql_class.h" /* enum_duplicates */
20 #include "sql_list.h"
21 
22 /* Instead of including sql_lex.h we add this typedef here */
23 typedef List<Item> List_item;
24 
25 bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, TABLE *table,
26  List<Item> &fields, List_item *values,
27  List<Item> &update_fields,
28  List<Item> &update_values, enum_duplicates duplic,
29  Item **where, bool select_insert,
30  bool check_fields, bool abort_on_warning);
31 bool mysql_insert(THD *thd,TABLE_LIST *table,List<Item> &fields,
32  List<List_item> &values, List<Item> &update_fields,
33  List<Item> &update_values, enum_duplicates flag,
34  bool ignore);
35 void upgrade_lock_type_for_insert(THD *thd, thr_lock_type *lock_type,
36  enum_duplicates duplic,
37  bool is_multi_insert);
38 int check_that_all_fields_are_given_values(THD *thd, TABLE *entry,
39  TABLE_LIST *table_list);
40 void prepare_triggers_for_insert_stmt(TABLE *table);
41 int write_record(THD *thd, TABLE *table,
42  COPY_INFO *info, COPY_INFO *update);
43 void kill_delayed_threads(void);
44 bool validate_default_values_of_unset_fields(THD *thd, TABLE *table);
45 
46 #ifdef EMBEDDED_LIBRARY
47 inline void kill_delayed_threads(void) {}
48 #endif
49 
50 #endif /* SQL_INSERT_INCLUDED */