mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
branches/zip: Minor cleanup.
row_merge_mark_prebuilt_obsolete(): Rename to row_prebuilt_table_obsolete() and move from row0merge.c to row0mysql.c. Remove the parameter trx. row_merge_print_table(): Remove.
This commit is contained in:
parent
eddd2aed6a
commit
b2c09f8a34
5 changed files with 41 additions and 66 deletions
|
@ -8282,7 +8282,9 @@ err_exit:
|
|||
num_of_idx);
|
||||
|
||||
if (error == DB_SUCCESS && new_primary) {
|
||||
row_merge_mark_prebuilt_obsolete(trx, innodb_table);
|
||||
row_mysql_lock_data_dictionary(trx);
|
||||
row_prebuilt_table_obsolete(innodb_table);
|
||||
row_mysql_unlock_data_dictionary(trx);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8625,10 +8627,6 @@ ha_innobase::final_drop_index(
|
|||
|
||||
log_buffer_flush_to_disk();
|
||||
|
||||
#ifdef UNIV_DEBUG_INDEX_CREATE
|
||||
row_merge_print_table(prebuilt->table);
|
||||
#endif
|
||||
|
||||
/* Tell the InnoDB server that there might be work for
|
||||
utility threads: */
|
||||
|
||||
|
|
|
@ -125,23 +125,6 @@ row_merge_file_create(
|
|||
merge_file_t* merge_file); /* out: merge file structure */
|
||||
|
||||
/*************************************************************************
|
||||
Print definition of a table in the dictionary */
|
||||
|
||||
void
|
||||
row_merge_print_table(
|
||||
/*==================*/
|
||||
dict_table_t* table); /* in: table */
|
||||
/*************************************************************************
|
||||
Mark all prebuilts using the table obsolete. These prebuilts are
|
||||
rebuilded later. */
|
||||
|
||||
void
|
||||
row_merge_mark_prebuilt_obsolete(
|
||||
/*=============================*/
|
||||
|
||||
trx_t* trx, /* in: trx */
|
||||
dict_table_t* table); /* in: table */
|
||||
/*************************************************************************
|
||||
Create a temporary table using a definition of the old table. You must
|
||||
lock data dictionary before calling this function. */
|
||||
|
||||
|
|
|
@ -162,6 +162,14 @@ row_update_prebuilt(
|
|||
row_prebuilt_t* prebuilt, /* in: Innobase table handle */
|
||||
dict_table_t* table); /* in: table */
|
||||
/*************************************************************************
|
||||
Mark all prebuilt structs that use a table obsolete. They will
|
||||
be rebuilt later. */
|
||||
|
||||
void
|
||||
row_prebuilt_table_obsolete(
|
||||
/*========================*/
|
||||
dict_table_t* table); /* in: table */
|
||||
/*************************************************************************
|
||||
Unlocks an AUTO_INC type lock possibly reserved by trx. */
|
||||
|
||||
void
|
||||
|
|
|
@ -1839,50 +1839,6 @@ row_merge_file_create(
|
|||
merge_file->num_of_blocks = 0;
|
||||
}
|
||||
|
||||
#ifdef UNIV_DEBUG_INDEX_CREATE
|
||||
/*************************************************************************
|
||||
Print definition of a table in the dictionary */
|
||||
|
||||
void
|
||||
row_merge_print_table(
|
||||
/*==================*/
|
||||
dict_table_t* table) /* in: table */
|
||||
{
|
||||
dict_table_print(table);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*************************************************************************
|
||||
Mark all prebuilts using the table obsolete. These prebuilts are
|
||||
rebuilt later. */
|
||||
|
||||
void
|
||||
row_merge_mark_prebuilt_obsolete(
|
||||
/*=============================*/
|
||||
|
||||
trx_t* trx, /* in: trx */
|
||||
dict_table_t* table) /* in: table */
|
||||
{
|
||||
row_prebuilt_t* prebuilt;
|
||||
|
||||
row_mysql_lock_data_dictionary(trx);
|
||||
|
||||
prebuilt = UT_LIST_GET_FIRST(table->prebuilts);
|
||||
|
||||
while (prebuilt) {
|
||||
prebuilt->magic_n = ROW_PREBUILT_OBSOLETE;
|
||||
prebuilt->magic_n2 = ROW_PREBUILT_OBSOLETE;
|
||||
|
||||
prebuilt = UT_LIST_GET_NEXT(prebuilts, prebuilt);
|
||||
}
|
||||
|
||||
/* This table will be dropped when there are no more references
|
||||
to it */
|
||||
table->to_be_dropped = 1;
|
||||
|
||||
row_mysql_unlock_data_dictionary(trx);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Create a temporary table using a definition of the old table. You must
|
||||
lock data dictionary before calling this function. */
|
||||
|
|
|
@ -809,6 +809,36 @@ row_prebuilt_free(
|
|||
mem_heap_free(prebuilt->heap);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Mark all prebuilt structs that use a table obsolete. They will
|
||||
be rebuilt later. */
|
||||
|
||||
void
|
||||
row_prebuilt_table_obsolete(
|
||||
/*========================*/
|
||||
dict_table_t* table) /* in: table */
|
||||
{
|
||||
row_prebuilt_t* prebuilt;
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
ut_ad(mutex_own(&dict_sys->mutex));
|
||||
|
||||
prebuilt = UT_LIST_GET_FIRST(table->prebuilts);
|
||||
|
||||
while (prebuilt) {
|
||||
prebuilt->magic_n = ROW_PREBUILT_OBSOLETE;
|
||||
prebuilt->magic_n2 = ROW_PREBUILT_OBSOLETE;
|
||||
|
||||
prebuilt = UT_LIST_GET_NEXT(prebuilts, prebuilt);
|
||||
}
|
||||
|
||||
/* This table will be dropped when there are no more references
|
||||
to it */
|
||||
table->to_be_dropped = 1;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Updates the transaction pointers in query graphs stored in the prebuilt
|
||||
struct. */
|
||||
|
|
Loading…
Reference in a new issue