service_thd_engine_lock.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* Copyright (c) 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 St, Fifth Floor, Boston, MA 02110-1301 USA */
  18. #ifndef MYSQL_SERVICE_THD_EGINE_LOCK_INCLUDED
  19. #define MYSQL_SERVICE_THD_EGINE_LOCK_INCLUDED
  20. /**
  21. @file include/mysql/service_thd_engine_lock.h
  22. This service provides functions for storage engines to report
  23. lock related activities.
  24. SYNOPSIS
  25. thd_row_lock_wait() - call it just when the engine find a transaction should wait
  26. another transaction to realease a row lock
  27. thd The session which is waiting for the row lock to release.
  28. thd_wait_for The session which is holding the row lock.
  29. */
  30. #ifdef __cplusplus
  31. class THD;
  32. #else
  33. #define THD void
  34. #endif
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38. void thd_report_row_lock_wait(THD* self, THD *wait_for);
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif