@@ -95,7 +95,7 @@ in S-mode; we cannot trust that MySQL protects implicit or background
9595operations a table drop since MySQL does not know of them; therefore
9696we need this; NOTE: a transaction which reserves this must keep book
9797on the mode in trx_t::dict_operation_lock_mode */
98- rw_lock_t * dict_operation_lock;
98+ rw_lock_t dict_operation_lock;
9999
100100/* * Percentage of compression failures that are allowed in a single
101101round */
@@ -549,7 +549,7 @@ dict_table_close_and_drop(
549549dberr_t err = DB_SUCCESS;
550550
551551ut_ad (mutex_own (&dict_sys->mutex ));
552- ut_ad (rw_lock_own (dict_operation_lock, RW_LOCK_X));
552+ ut_ad (rw_lock_own (& dict_operation_lock, RW_LOCK_X));
553553ut_ad (trx->dict_operation != TRX_DICT_OP_NONE);
554554ut_ad (trx_state_eq (trx, TRX_STATE_ACTIVE));
555555
@@ -1078,9 +1078,6 @@ void
10781078dict_init (void )
10791079/* ===========*/
10801080{
1081- dict_operation_lock = static_cast <rw_lock_t *>(
1082- ut_zalloc_nokey (sizeof (*dict_operation_lock)));
1083-
10841081dict_sys = static_cast <dict_sys_t *>(ut_zalloc_nokey (sizeof (*dict_sys)));
10851082
10861083UT_LIST_INIT (dict_sys->table_LRU , &dict_table_t ::table_LRU);
@@ -1097,7 +1094,7 @@ dict_init(void)
10971094/ (DICT_POOL_PER_TABLE_HASH * UNIV_WORD_SIZE));
10981095
10991096rw_lock_create (dict_operation_lock_key,
1100- dict_operation_lock, SYNC_DICT_OPERATION);
1097+ & dict_operation_lock, SYNC_DICT_OPERATION);
11011098
11021099if (!srv_read_only_mode) {
11031100dict_foreign_err_file = os_file_create_tmpfile ();
@@ -1325,7 +1322,7 @@ dict_table_can_be_evicted(
13251322dict_table_t * table)/* !< in: table to test */
13261323{
13271324ut_ad (mutex_own (&dict_sys->mutex ));
1328- ut_ad (rw_lock_own (dict_operation_lock, RW_LOCK_X));
1325+ ut_ad (rw_lock_own (& dict_operation_lock, RW_LOCK_X));
13291326
13301327ut_a (table->can_be_evicted );
13311328ut_a (table->foreign_set .empty ());
@@ -1393,7 +1390,7 @@ dict_make_room_in_cache(
13931390ut_a (pct_check > 0 );
13941391ut_a (pct_check <= 100 );
13951392ut_ad (mutex_own (&dict_sys->mutex ));
1396- ut_ad (rw_lock_own (dict_operation_lock, RW_LOCK_X));
1393+ ut_ad (rw_lock_own (& dict_operation_lock, RW_LOCK_X));
13971394ut_ad (dict_lru_validate ());
13981395
13991396i = len = UT_LIST_GET_LEN (dict_sys->table_LRU );
@@ -2030,7 +2027,7 @@ dict_table_remove_from_cache_low(
20302027trx_t * trx = trx_create ();
20312028
20322029ut_ad (mutex_own (&dict_sys->mutex ));
2033- ut_ad (rw_lock_own (dict_operation_lock, RW_LOCK_X));
2030+ ut_ad (rw_lock_own (& dict_operation_lock, RW_LOCK_X));
20342031
20352032/* Mimic row_mysql_lock_data_dictionary(). */
20362033trx->dict_operation_lock_mode = RW_X_LATCH;
@@ -5956,7 +5953,7 @@ dict_index_set_merge_threshold(
59565953ut_ad (!dict_table_is_comp (dict_sys->sys_tables ));
59575954ut_ad (!dict_table_is_comp (dict_sys->sys_indexes ));
59585955
5959- rw_lock_x_lock (dict_operation_lock);
5956+ rw_lock_x_lock (& dict_operation_lock);
59605957mutex_enter (&(dict_sys->mutex ));
59615958
59625959heap = mem_heap_create (sizeof (dtuple_t ) + 2 * (sizeof (dfield_t )
@@ -6006,7 +6003,7 @@ dict_index_set_merge_threshold(
60066003mem_heap_free (heap);
60076004
60086005mutex_exit (&(dict_sys->mutex ));
6009- rw_lock_x_unlock (dict_operation_lock);
6006+ rw_lock_x_unlock (& dict_operation_lock);
60106007}
60116008
60126009#ifdef UNIV_DEBUG
@@ -6600,10 +6597,7 @@ dict_close(void)
66006597mutex_exit (&dict_sys->mutex );
66016598mutex_free (&dict_sys->mutex );
66026599
6603- rw_lock_free (dict_operation_lock);
6604-
6605- ut_free (dict_operation_lock);
6606- dict_operation_lock = NULL ;
6600+ rw_lock_free (&dict_operation_lock);
66076601
66086602mutex_free (&dict_foreign_err_mutex);
66096603
@@ -7014,7 +7008,7 @@ dict_space_is_empty(
70147008mtr_t mtr;
70157009bool found = false ;
70167010
7017- rw_lock_x_lock (dict_operation_lock);
7011+ rw_lock_x_lock (& dict_operation_lock);
70187012mutex_enter (&dict_sys->mutex );
70197013mtr_start (&mtr);
70207014
@@ -7037,7 +7031,7 @@ dict_space_is_empty(
70377031
70387032mtr_commit (&mtr);
70397033mutex_exit (&dict_sys->mutex );
7040- rw_lock_x_unlock (dict_operation_lock);
7034+ rw_lock_x_unlock (& dict_operation_lock);
70417035
70427036return (!found);
70437037}
@@ -7055,7 +7049,7 @@ dict_space_get_id(
70557049ulint name_len = strlen (name);
70567050ulint id = ULINT_UNDEFINED;
70577051
7058- rw_lock_x_lock (dict_operation_lock);
7052+ rw_lock_x_lock (& dict_operation_lock);
70597053mutex_enter (&dict_sys->mutex );
70607054mtr_start (&mtr);
70617055
@@ -7086,7 +7080,7 @@ dict_space_get_id(
70867080
70877081mtr_commit (&mtr);
70887082mutex_exit (&dict_sys->mutex );
7089- rw_lock_x_unlock (dict_operation_lock);
7083+ rw_lock_x_unlock (& dict_operation_lock);
70907084
70917085return (id);
70927086}
0 commit comments