Commit 89423c04 authored by vasil's avatar vasil

branches/zip:

Add auxiliary function lock_rec_get_index() to retrieve the index on
which the lock is.

Approved by:	Heikki
parent 54df816b
......@@ -732,6 +732,15 @@ lock_get_table_name(
/* out: name of the table */
const lock_t* lock); /* in: lock */
/***********************************************************************
For a record lock, gets the index on which the lock is. */
const dict_index_t*
lock_rec_get_index(
/*===============*/
/* out: index */
const lock_t* lock); /* in: lock */
/***********************************************************************
For a record lock, gets the name of the index on which the lock is.
The string should not be free()'d or modified. */
......
......@@ -5484,6 +5484,20 @@ lock_get_table_name(
return(table->name);
}
/***********************************************************************
For a record lock, gets the index on which the lock is. */
const dict_index_t*
lock_rec_get_index(
/*===============*/
/* out: index */
const lock_t* lock) /* in: lock */
{
ut_a(lock_get_type_low(lock) == LOCK_REC);
return(lock->index);
}
/***********************************************************************
For a record lock, gets the name of the index on which the lock is.
The string should not be free()'d or modified. */
......
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