You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
2.2 KiB

  1. /* Copyright 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; version 2 of the License.
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License
  10. along with this program; if not, write to the Free Software
  11. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
  12. #ifndef SQL_INSERT_INCLUDED
  13. #define SQL_INSERT_INCLUDED
  14. #include "sql_class.h" /* enum_duplicates */
  15. #include "sql_list.h"
  16. /* Instead of including sql_lex.h we add this typedef here */
  17. typedef List<Item> List_item;
  18. typedef struct st_copy_info COPY_INFO;
  19. bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, TABLE *table,
  20. List<Item> &fields, List_item *values,
  21. List<Item> &update_fields,
  22. List<Item> &update_values, enum_duplicates duplic,
  23. COND **where, bool select_insert,
  24. bool check_fields, bool abort_on_warning);
  25. bool mysql_insert(THD *thd,TABLE_LIST *table,List<Item> &fields,
  26. List<List_item> &values, List<Item> &update_fields,
  27. List<Item> &update_values, enum_duplicates flag,
  28. bool ignore);
  29. void upgrade_lock_type_for_insert(THD *thd, thr_lock_type *lock_type,
  30. enum_duplicates duplic,
  31. bool is_multi_insert);
  32. int check_that_all_fields_are_given_values(THD *thd, TABLE *entry,
  33. TABLE_LIST *table_list);
  34. void prepare_triggers_for_insert_stmt(TABLE *table);
  35. int write_record(THD *thd, TABLE *table, COPY_INFO *info);
  36. void kill_delayed_threads(void);
  37. #ifdef EMBEDDED_LIBRARY
  38. inline void kill_delayed_threads(void) {}
  39. #endif
  40. #endif /* SQL_INSERT_INCLUDED */