Commit 698e37d6 authored by Darshan M N's avatar Darshan M N Committed by Marko Mäkelä

BUG#25251082 DISABLING CERTAIN MACROS IN INNODB RESULTS IN COMPILATION ERRORS

Issue:
======
Disabling macros such as UNIV_PFS_MUTEX/UNIV_PFS_RWLOCK/UNIV_PFS_THREAD
which are defined in InnoDB throws errors during compilation.

Fix:
====
Fix all the compilation errors.

RB: 14893
Reviewed-by: default avatarJimmy Yang <Jimmy.Yang@oracle.com>
Reviewed-by: default avatarSatya Bodapati <satya.bodapati@oracle.com>
parent 16ed1f9c
......@@ -505,14 +505,32 @@ struct OSMutex {
};
#ifdef UNIV_PFS_MUTEX
/** Latch element
/** Latch element.
Used for mutexes which have PFS keys defined under UNIV_PFS_MUTEX.
@param[in] id Latch id
@param[in] level Latch level
@param[in] key PFS key */
# define LATCH_ADD(id, level, key) latch_meta[LATCH_ID_ ## id] = \
# define LATCH_ADD_MUTEX(id, level, key) latch_meta[LATCH_ID_ ## id] =\
UT_NEW_NOKEY(latch_meta_t(LATCH_ID_ ## id, #id, level, #level, key))
#ifdef UNIV_PFS_RWLOCK
/** Latch element.
Used for rwlocks which have PFS keys defined under UNIV_PFS_RWLOCK.
@param[in] id Latch id
@param[in] level Latch level
@param[in] key PFS key */
# define LATCH_ADD_RWLOCK(id, level, key) latch_meta[LATCH_ID_ ## id] =\
UT_NEW_NOKEY(latch_meta_t(LATCH_ID_ ## id, #id, level, #level, key))
#else
# define LATCH_ADD(id, level, key) latch_meta[LATCH_ID_ ## id] = \
# define LATCH_ADD_RWLOCK(id, level, key) latch_meta[LATCH_ID_ ## id] =\
UT_NEW_NOKEY(latch_meta_t(LATCH_ID_ ## id, #id, level, #level, \
PSI_NOT_INSTRUMENTED))
#endif /* UNIV_PFS_RWLOCK */
#else
# define LATCH_ADD_MUTEX(id, level, key) latch_meta[LATCH_ID_ ## id] =\
UT_NEW_NOKEY(latch_meta_t(LATCH_ID_ ## id, #id, level, #level))
# define LATCH_ADD_RWLOCK(id, level, key) latch_meta[LATCH_ID_ ## id] =\
UT_NEW_NOKEY(latch_meta_t(LATCH_ID_ ## id, #id, level, #level))
#endif /* UNIV_PFS_MUTEX */
......@@ -919,7 +937,7 @@ sync_latch_get_level(latch_id_t id)
return(meta.get_level());
}
#ifdef HAVE_PSI_INTERFACE
#ifdef UNIV_PFS_MUTEX
/** Get the latch PFS key from the latch ID
@param[in] id Latch ID
@return the PFS key */
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment