mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
branches/zip: lock_rec_print(), lock_table_print(), lock_rec_get_prev():
Add a const qualifier to lock_t*.
This commit is contained in:
parent
8519302258
commit
952b4b8de2
2 changed files with 19 additions and 19 deletions
|
@ -615,16 +615,16 @@ Prints info of a table lock. */
|
|||
void
|
||||
lock_table_print(
|
||||
/*=============*/
|
||||
FILE* file, /* in: file where to print */
|
||||
lock_t* lock); /* in: table type lock */
|
||||
FILE* file, /* in: file where to print */
|
||||
const lock_t* lock); /* in: table type lock */
|
||||
/*************************************************************************
|
||||
Prints info of a record lock. */
|
||||
|
||||
void
|
||||
lock_rec_print(
|
||||
/*===========*/
|
||||
FILE* file, /* in: file where to print */
|
||||
lock_t* lock); /* in: record type lock */
|
||||
FILE* file, /* in: file where to print */
|
||||
const lock_t* lock); /* in: record type lock */
|
||||
/*************************************************************************
|
||||
Prints info of locks for all transactions. */
|
||||
|
||||
|
|
|
@ -1360,18 +1360,18 @@ lock_rec_copy(
|
|||
/*************************************************************************
|
||||
Gets the previous record lock set on a record. */
|
||||
static
|
||||
lock_t*
|
||||
const lock_t*
|
||||
lock_rec_get_prev(
|
||||
/*==============*/
|
||||
/* out: previous lock on the same record, NULL if
|
||||
none exists */
|
||||
lock_t* in_lock,/* in: record lock */
|
||||
ulint heap_no)/* in: heap number of the record */
|
||||
/* out: previous lock on the same
|
||||
record, NULL if none exists */
|
||||
const lock_t* in_lock,/* in: record lock */
|
||||
ulint heap_no)/* in: heap number of the record */
|
||||
{
|
||||
lock_t* lock;
|
||||
ulint space;
|
||||
ulint page_no;
|
||||
lock_t* found_lock = NULL;
|
||||
const lock_t* lock;
|
||||
ulint space;
|
||||
ulint page_no;
|
||||
const lock_t* found_lock = NULL;
|
||||
|
||||
ut_ad(mutex_own(&kernel_mutex));
|
||||
ut_ad(lock_get_type(in_lock) == LOCK_REC);
|
||||
|
@ -1394,7 +1394,7 @@ lock_rec_get_prev(
|
|||
found_lock = lock;
|
||||
}
|
||||
|
||||
lock = lock_rec_get_next_on_page(lock);
|
||||
lock = lock_rec_get_next_on_page((lock_t*) lock);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3439,7 +3439,7 @@ lock_deadlock_recursive(
|
|||
ut_ad(lock_get_type(lock) == LOCK_REC);
|
||||
ut_a(bit_no != ULINT_UNDEFINED);
|
||||
|
||||
lock = lock_rec_get_prev(lock, bit_no);
|
||||
lock = (lock_t*) lock_rec_get_prev(lock, bit_no);
|
||||
}
|
||||
|
||||
if (lock == NULL) {
|
||||
|
@ -4191,8 +4191,8 @@ Prints info of a table lock. */
|
|||
void
|
||||
lock_table_print(
|
||||
/*=============*/
|
||||
FILE* file, /* in: file where to print */
|
||||
lock_t* lock) /* in: table type lock */
|
||||
FILE* file, /* in: file where to print */
|
||||
const lock_t* lock) /* in: table type lock */
|
||||
{
|
||||
ut_ad(mutex_own(&kernel_mutex));
|
||||
ut_a(lock_get_type(lock) == LOCK_TABLE);
|
||||
|
@ -4231,8 +4231,8 @@ Prints info of a record lock. */
|
|||
void
|
||||
lock_rec_print(
|
||||
/*===========*/
|
||||
FILE* file, /* in: file where to print */
|
||||
lock_t* lock) /* in: record type lock */
|
||||
FILE* file, /* in: file where to print */
|
||||
const lock_t* lock) /* in: record type lock */
|
||||
{
|
||||
buf_block_t* block;
|
||||
ulint space;
|
||||
|
|
Loading…
Reference in a new issue