491
491
return(dict_table_flags_to_zip_size(table->flags));
494
/*********************************************************************//**
495
Obtain exclusive locks on all index trees of the table. This is to prevent
496
accessing index trees while InnoDB is updating internal metadata for
497
operations such as truncate tables. */
500
dict_table_x_lock_indexes(
501
/*======================*/
502
dict_table_t* table) /*!< in: table */
507
ut_ad(mutex_own(&(dict_sys->mutex)));
509
/* Loop through each index of the table and lock them */
510
for (index = dict_table_get_first_index(table);
512
index = dict_table_get_next_index(index)) {
513
rw_lock_x_lock(dict_index_get_lock(index));
517
/*********************************************************************//**
518
Release the exclusive locks on all index tree. */
521
dict_table_x_unlock_indexes(
522
/*========================*/
523
dict_table_t* table) /*!< in: table */
528
ut_ad(mutex_own(&(dict_sys->mutex)));
530
for (index = dict_table_get_first_index(table);
532
index = dict_table_get_next_index(index)) {
533
rw_lock_x_unlock(dict_index_get_lock(index));
494
536
/********************************************************************//**
495
537
Gets the number of fields in the internal representation of an index,
496
538
including fields added by the dictionary system.