mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Import branches/innodb+ from SVN on top of storage/innobase.
This commit is contained in:
commit
c877ff39bc
165 changed files with 13060 additions and 2981 deletions
|
|
@ -35,6 +35,8 @@ hash_get_nth_cell(
|
|||
hash_table_t* table, /*!< in: hash table */
|
||||
ulint n) /*!< in: cell index */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
|
||||
ut_ad(n < table->n_cells);
|
||||
|
||||
return(table->array + n);
|
||||
|
|
@ -48,6 +50,8 @@ hash_table_clear(
|
|||
/*=============*/
|
||||
hash_table_t* table) /*!< in/out: hash table */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
|
||||
memset(table->array, 0x0,
|
||||
table->n_cells * sizeof(*table->array));
|
||||
}
|
||||
|
|
@ -61,6 +65,8 @@ hash_get_n_cells(
|
|||
/*=============*/
|
||||
hash_table_t* table) /*!< in: table */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
|
||||
return(table->n_cells);
|
||||
}
|
||||
|
||||
|
|
@ -74,6 +80,8 @@ hash_calc_hash(
|
|||
ulint fold, /*!< in: folded value */
|
||||
hash_table_t* table) /*!< in: hash table */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
|
||||
return(ut_hash_ulint(fold, table->n_cells));
|
||||
}
|
||||
|
||||
|
|
@ -88,6 +96,8 @@ hash_get_mutex_no(
|
|||
hash_table_t* table, /*!< in: hash table */
|
||||
ulint fold) /*!< in: fold */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
|
||||
ut_ad(ut_is_2pow(table->n_mutexes));
|
||||
return(ut_2pow_remainder(hash_calc_hash(fold, table),
|
||||
table->n_mutexes));
|
||||
|
|
@ -103,6 +113,8 @@ hash_get_nth_heap(
|
|||
hash_table_t* table, /*!< in: hash table */
|
||||
ulint i) /*!< in: index of the heap */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
|
||||
ut_ad(i < table->n_mutexes);
|
||||
|
||||
return(table->heaps[i]);
|
||||
|
|
@ -120,6 +132,9 @@ hash_get_heap(
|
|||
{
|
||||
ulint i;
|
||||
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
|
||||
|
||||
if (table->heap) {
|
||||
return(table->heap);
|
||||
}
|
||||
|
|
@ -139,6 +154,8 @@ hash_get_nth_mutex(
|
|||
hash_table_t* table, /*!< in: hash table */
|
||||
ulint i) /*!< in: index of the mutex */
|
||||
{
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
|
||||
ut_ad(i < table->n_mutexes);
|
||||
|
||||
return(table->mutexes + i);
|
||||
|
|
@ -156,6 +173,9 @@ hash_get_mutex(
|
|||
{
|
||||
ulint i;
|
||||
|
||||
ut_ad(table);
|
||||
ut_ad(table->magic_n == HASH_TABLE_MAGIC_N);
|
||||
|
||||
i = hash_get_mutex_no(table, fold);
|
||||
|
||||
return(hash_get_nth_mutex(table, i));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue