Commit 0845bd2d authored by vasil's avatar vasil

branches/zip:

 
Non-functional change:
 
Move the prototypes of
innobase_mysql_prepare_print_arbitrary_thd() and
innobase_mysql_end_print_arbitrary_thd() from lock0lock.c to
ha_prototypes.h

Suggested by:	Marko
Approved by:	Marko
parent 476cadbf
...@@ -703,9 +703,7 @@ you must call this function before reserving the InnoDB kernel_mutex, to ...@@ -703,9 +703,7 @@ you must call this function before reserving the InnoDB kernel_mutex, to
protect MySQL from setting thd->query NULL. If you print a thd of the current protect MySQL from setting thd->query NULL. If you print a thd of the current
thread, we know that MySQL cannot modify thd->query, and it is not necessary thread, we know that MySQL cannot modify thd->query, and it is not necessary
to call this. Call innobase_mysql_end_print_arbitrary_thd() after you release to call this. Call innobase_mysql_end_print_arbitrary_thd() after you release
the kernel_mutex. the kernel_mutex. */
NOTE that /mysql/innobase/lock/lock0lock.c must contain the prototype for this
function! */
extern "C" extern "C"
void void
innobase_mysql_prepare_print_arbitrary_thd(void) innobase_mysql_prepare_print_arbitrary_thd(void)
...@@ -716,8 +714,7 @@ innobase_mysql_prepare_print_arbitrary_thd(void) ...@@ -716,8 +714,7 @@ innobase_mysql_prepare_print_arbitrary_thd(void)
/***************************************************************** /*****************************************************************
Releases the mutex reserved by innobase_mysql_prepare_print_arbitrary_thd(). Releases the mutex reserved by innobase_mysql_prepare_print_arbitrary_thd().
NOTE that /mysql/innobase/lock/lock0lock.c must contain the prototype for this */
function! */
extern "C" extern "C"
void void
innobase_mysql_end_print_arbitrary_thd(void) innobase_mysql_end_print_arbitrary_thd(void)
......
...@@ -95,5 +95,25 @@ get_innobase_type_from_mysql_type( ...@@ -95,5 +95,25 @@ get_innobase_type_from_mysql_type(
const void* field) /* in: MySQL Field */ const void* field) /* in: MySQL Field */
__attribute__((nonnull)); __attribute__((nonnull));
/*****************************************************************
If you want to print a thd that is not associated with the current thread,
you must call this function before reserving the InnoDB kernel_mutex, to
protect MySQL from setting thd->query NULL. If you print a thd of the current
thread, we know that MySQL cannot modify thd->query, and it is not necessary
to call this. Call innobase_mysql_end_print_arbitrary_thd() after you release
the kernel_mutex. */
void
innobase_mysql_prepare_print_arbitrary_thd(void);
/*============================================*/
/*****************************************************************
Releases the mutex reserved by innobase_mysql_prepare_print_arbitrary_thd().
*/
void
innobase_mysql_end_print_arbitrary_thd(void);
/*========================================*/
#endif #endif
#endif #endif
...@@ -16,37 +16,12 @@ Created 5/7/1996 Heikki Tuuri ...@@ -16,37 +16,12 @@ Created 5/7/1996 Heikki Tuuri
#include "lock0priv.ic" #include "lock0priv.ic"
#endif #endif
#include "ha_prototypes.h"
#include "usr0sess.h" #include "usr0sess.h"
#include "trx0purge.h" #include "trx0purge.h"
#include "dict0mem.h" #include "dict0mem.h"
#include "trx0sys.h" #include "trx0sys.h"
/* 2 function prototypes copied from ha_innodb.cc: */
/*****************************************************************
If you want to print a thd that is not associated with the current thread,
you must call this function before reserving the InnoDB kernel_mutex, to
protect MySQL from setting thd->query NULL. If you print a thd of the current
thread, we know that MySQL cannot modify thd->query, and it is not necessary
to call this. Call innobase_mysql_end_print_arbitrary_thd() after you release
the kernel_mutex.
NOTE that /mysql/innobase/lock/lock0lock.c must contain the prototype for this
function! */
void
innobase_mysql_prepare_print_arbitrary_thd(void);
/*============================================*/
/*****************************************************************
Relases the mutex reserved by innobase_mysql_prepare_print_arbitrary_thd().
NOTE that /mysql/innobase/lock/lock0lock.c must contain the prototype for this
function! */
void
innobase_mysql_end_print_arbitrary_thd(void);
/*========================================*/
/* Restricts the length of search we will do in the waits-for /* Restricts the length of search we will do in the waits-for
graph of transactions */ graph of transactions */
#define LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK 1000000 #define LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK 1000000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment