452
452
return(dict_table_flags_to_zip_size(table->flags));
455
/*********************************************************************//**
456
Obtain exclusive locks on all index trees of the table. This is to prevent
457
accessing index trees while InnoDB is updating internal metadata for
458
operations such as truncate tables. */
461
dict_table_x_lock_indexes(
462
/*======================*/
463
dict_table_t* table) /*!< in: table */
468
ut_ad(mutex_own(&(dict_sys->mutex)));
470
/* Loop through each index of the table and lock them */
471
for (index = dict_table_get_first_index(table);
473
index = dict_table_get_next_index(index)) {
474
rw_lock_x_lock(dict_index_get_lock(index));
478
/*********************************************************************//**
479
Release the exclusive locks on all index tree. */
482
dict_table_x_unlock_indexes(
483
/*========================*/
484
dict_table_t* table) /*!< in: table */
489
ut_ad(mutex_own(&(dict_sys->mutex)));
491
for (index = dict_table_get_first_index(table);
493
index = dict_table_get_next_index(index)) {
494
rw_lock_x_unlock(dict_index_get_lock(index));
455
497
/********************************************************************//**
456
498
Gets the number of fields in the internal representation of an index,
457
499
including fields added by the dictionary system.