mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
Merge from mysql-5.1-security to mysql-5.5-security.
This commit is contained in:
commit
cb0f8ca451
6 changed files with 187 additions and 3 deletions
|
|
@ -50,6 +50,35 @@ ib_vector_get(
|
|||
return(vec->data[n]);
|
||||
}
|
||||
|
||||
/****************************************************************//**
|
||||
Get last element. The vector must not be empty.
|
||||
@return last element */
|
||||
UNIV_INLINE
|
||||
void*
|
||||
ib_vector_get_last(
|
||||
/*===============*/
|
||||
ib_vector_t* vec) /*!< in: vector */
|
||||
{
|
||||
ut_a(vec->used > 0);
|
||||
|
||||
return(vec->data[vec->used - 1]);
|
||||
}
|
||||
|
||||
/****************************************************************//**
|
||||
Set the n'th element. */
|
||||
UNIV_INLINE
|
||||
void
|
||||
ib_vector_set(
|
||||
/*==========*/
|
||||
ib_vector_t* vec, /*!< in/out: vector */
|
||||
ulint n, /*!< in: element index to set */
|
||||
void* elem) /*!< in: data element */
|
||||
{
|
||||
ut_a(n < vec->used);
|
||||
|
||||
vec->data[n] = elem;
|
||||
}
|
||||
|
||||
/****************************************************************//**
|
||||
Remove the last element from the vector.
|
||||
@return last vector element */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue