innodb_priv.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License, version 2.0,
  4. as published by the Free Software Foundation.
  5. This program is also distributed with certain software (including
  6. but not limited to OpenSSL) that is licensed under separate terms,
  7. as designated in a particular file or component or in included license
  8. documentation. The authors of MySQL hereby grant you an additional
  9. permission to link the program and your derivative works with the
  10. separately licensed software that they have included with MySQL.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License, version 2.0, for more details.
  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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
  18. #ifndef INNODB_PRIV_INCLUDED
  19. #define INNODB_PRIV_INCLUDED
  20. /** @file Declaring server-internal functions that are used by InnoDB. */
  21. class THD;
  22. int get_quote_char_for_identifier(THD *thd, const char *name, size_t length);
  23. bool schema_table_store_record(THD *thd, TABLE *table);
  24. void localtime_to_TIME(MYSQL_TIME *to, struct tm *from);
  25. bool check_global_access(THD *thd, ulong want_access);
  26. size_t strconvert(CHARSET_INFO *from_cs, const char *from,
  27. CHARSET_INFO *to_cs, char *to, size_t to_length,
  28. uint *errors);
  29. void sql_print_error(const char *format, ...);
  30. /**
  31. Store record to I_S table, convert HEAP table to InnoDB table if necessary.
  32. @param[in] thd thread handler
  33. @param[in] table Information schema table to be updated
  34. @param[in] make_ondisk if true, convert heap table to on disk table.
  35. default value is true.
  36. @return 0 on success
  37. @return error code on failure.
  38. */
  39. int schema_table_store_record2(THD *thd, TABLE *table, bool make_ondisk);
  40. /**
  41. Convert HEAP table to InnoDB table if necessary
  42. @param[in] thd thread handler
  43. @param[in] table Information schema table to be converted.
  44. @param[in] error the error code returned previously.
  45. @return false on success, true on error.
  46. */
  47. bool convert_heap_table_to_ondisk(THD *thd, TABLE *table, int error);
  48. #endif /* INNODB_PRIV_INCLUDED */