Commit 952b4b8d authored by marko's avatar marko

branches/zip: lock_rec_print(), lock_table_print(), lock_rec_get_prev():

Add a const qualifier to lock_t*.
parent 85193022
...@@ -615,16 +615,16 @@ Prints info of a table lock. */ ...@@ -615,16 +615,16 @@ Prints info of a table lock. */
void void
lock_table_print( lock_table_print(
/*=============*/ /*=============*/
FILE* file, /* in: file where to print */ FILE* file, /* in: file where to print */
lock_t* lock); /* in: table type lock */ const lock_t* lock); /* in: table type lock */
/************************************************************************* /*************************************************************************
Prints info of a record lock. */ Prints info of a record lock. */
void void
lock_rec_print( lock_rec_print(
/*===========*/ /*===========*/
FILE* file, /* in: file where to print */ FILE* file, /* in: file where to print */
lock_t* lock); /* in: record type lock */ const lock_t* lock); /* in: record type lock */
/************************************************************************* /*************************************************************************
Prints info of locks for all transactions. */ Prints info of locks for all transactions. */
......
...@@ -1360,18 +1360,18 @@ lock_rec_copy( ...@@ -1360,18 +1360,18 @@ lock_rec_copy(
/************************************************************************* /*************************************************************************
Gets the previous record lock set on a record. */ Gets the previous record lock set on a record. */
static static
lock_t* const lock_t*
lock_rec_get_prev( lock_rec_get_prev(
/*==============*/ /*==============*/
/* out: previous lock on the same record, NULL if /* out: previous lock on the same
none exists */ record, NULL if none exists */
lock_t* in_lock,/* in: record lock */ const lock_t* in_lock,/* in: record lock */
ulint heap_no)/* in: heap number of the record */ ulint heap_no)/* in: heap number of the record */
{ {
lock_t* lock; const lock_t* lock;
ulint space; ulint space;
ulint page_no; ulint page_no;
lock_t* found_lock = NULL; const lock_t* found_lock = NULL;
ut_ad(mutex_own(&kernel_mutex)); ut_ad(mutex_own(&kernel_mutex));
ut_ad(lock_get_type(in_lock) == LOCK_REC); ut_ad(lock_get_type(in_lock) == LOCK_REC);
...@@ -1394,7 +1394,7 @@ lock_rec_get_prev( ...@@ -1394,7 +1394,7 @@ lock_rec_get_prev(
found_lock = lock; 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( ...@@ -3439,7 +3439,7 @@ lock_deadlock_recursive(
ut_ad(lock_get_type(lock) == LOCK_REC); ut_ad(lock_get_type(lock) == LOCK_REC);
ut_a(bit_no != ULINT_UNDEFINED); 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) { if (lock == NULL) {
...@@ -4191,8 +4191,8 @@ Prints info of a table lock. */ ...@@ -4191,8 +4191,8 @@ Prints info of a table lock. */
void void
lock_table_print( lock_table_print(
/*=============*/ /*=============*/
FILE* file, /* in: file where to print */ FILE* file, /* in: file where to print */
lock_t* lock) /* in: table type lock */ const lock_t* lock) /* in: table type lock */
{ {
ut_ad(mutex_own(&kernel_mutex)); ut_ad(mutex_own(&kernel_mutex));
ut_a(lock_get_type(lock) == LOCK_TABLE); ut_a(lock_get_type(lock) == LOCK_TABLE);
...@@ -4231,8 +4231,8 @@ Prints info of a record lock. */ ...@@ -4231,8 +4231,8 @@ Prints info of a record lock. */
void void
lock_rec_print( lock_rec_print(
/*===========*/ /*===========*/
FILE* file, /* in: file where to print */ FILE* file, /* in: file where to print */
lock_t* lock) /* in: record type lock */ const lock_t* lock) /* in: record type lock */
{ {
buf_block_t* block; buf_block_t* block;
ulint space; ulint space;
......
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