mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 09:04:29 +02:00
Merge from mysql-5.1.55-release
This commit is contained in:
commit
17fe23e46c
41 changed files with 581 additions and 85 deletions
|
|
@ -296,6 +296,18 @@ number does not include a terminating '\0'. InnoDB probably can handle
|
|||
longer names internally */
|
||||
#define MAX_TABLE_NAME_LEN 192
|
||||
|
||||
/* The maximum length of a database name. Like MAX_TABLE_NAME_LEN this is
|
||||
the MySQL's NAME_LEN, see check_and_convert_db_name(). */
|
||||
#define MAX_DATABASE_NAME_LEN MAX_TABLE_NAME_LEN
|
||||
|
||||
/* MAX_FULL_NAME_LEN defines the full name path including the
|
||||
database name and table name. In addition, 14 bytes is added for:
|
||||
2 for surrounding quotes around table name
|
||||
1 for the separating dot (.)
|
||||
9 for the #mysql50# prefix */
|
||||
#define MAX_FULL_NAME_LEN \
|
||||
(MAX_TABLE_NAME_LEN + MAX_DATABASE_NAME_LEN + 14)
|
||||
|
||||
/*
|
||||
UNIVERSAL TYPE DEFINITIONS
|
||||
==========================
|
||||
|
|
|
|||
|
|
@ -93,6 +93,25 @@ ib_vector_get(
|
|||
ib_vector_t* vec, /*!< in: vector */
|
||||
ulint n); /*!< in: element index to get */
|
||||
|
||||
/****************************************************************//**
|
||||
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 */
|
||||
|
||||
/****************************************************************//**
|
||||
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 */
|
||||
|
||||
/****************************************************************//**
|
||||
Remove the last element from the vector. */
|
||||
UNIV_INLINE
|
||||
|
|
|
|||
|
|
@ -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