298
298
return(UNIV_LIKELY(table->flags & DICT_TF_COMPACT));
301
/*********************************************************************//**
302
Obtain exclusive locks on all index trees of the table. This is to prevent
303
accessing index trees while InnoDB is updating internal metadata for
304
operations such as truncate tables. */
307
dict_table_x_lock_indexes(
308
/*======================*/
309
dict_table_t* table) /* in: table */
314
ut_ad(mutex_own(&(dict_sys->mutex)));
316
/* Loop through each index of the table and lock them */
317
for (index = dict_table_get_first_index(table);
319
index = dict_table_get_next_index(index)) {
320
rw_lock_x_lock(dict_index_get_lock(index));
324
/*********************************************************************//**
325
Release the exclusive locks on all index tree. */
328
dict_table_x_unlock_indexes(
329
/*========================*/
330
dict_table_t* table) /* in: table */
335
ut_ad(mutex_own(&(dict_sys->mutex)));
337
for (index = dict_table_get_first_index(table);
339
index = dict_table_get_next_index(index)) {
340
rw_lock_x_unlock(dict_index_get_lock(index));
301
343
/************************************************************************
302
344
Gets the number of fields in the internal representation of an index,
303
345
including fields added by the dictionary system. */