mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Optimize performance schema likely/unlikely
Performance schema likely/unlikely assume that performance schema is enabled by default, which causes a performance degradation for default installations that doesn't have performance schema enabled. Fixed by changing the likely/unlikely in PS to assume it's not enabled. This can be changed by compiling with -DPSI_ON_BY_DEFAULT Other changes: - Added psi_likely/psi_unlikely that is depending on PSI_ON_BY_DEFAULT. psi_likely() is assumed to be true if PS is enabled. - Added likely/unlikely to some PS interface code. - Moved pfs_enabled to mysys (was initialized but not used before) - Added "if (pfs_likely(pfs_enabled))" around calls to PS to avoid an extra call if PS is not enabled. - Moved checking flag_global_instrumention before other flags to speed up the case when PS is not enabled.
This commit is contained in:
@@ -529,16 +529,18 @@ inline_mysql_file_fgets(
|
||||
{
|
||||
char *result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)
|
||||
(&state, file->m_psi, PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) size, src_file, src_line);
|
||||
result= fgets(str, size, file->m_file);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, result ? strlen(result) : 0);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker) (&state, file->m_psi, PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) size, src_file, src_line);
|
||||
result= fgets(str, size, file->m_file);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, result ? strlen(result) : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -555,16 +557,18 @@ inline_mysql_file_fgetc(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)
|
||||
(&state, file->m_psi, PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 1, src_file, src_line);
|
||||
result= fgetc(file->m_file);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 1);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 1, src_file, src_line);
|
||||
result= fgetc(file->m_file);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 1);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -581,18 +585,20 @@ inline_mysql_file_fputs(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)
|
||||
(&state, file->m_psi, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
bytes= str ? strlen(str) : 0;
|
||||
PSI_FILE_CALL(start_file_wait)(locker, bytes, src_file, src_line);
|
||||
result= fputs(str, file->m_file);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker) (&state, file->m_psi, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
bytes= str ? strlen(str) : 0;
|
||||
PSI_FILE_CALL(start_file_wait)(locker, bytes, src_file, src_line);
|
||||
result= fputs(str, file->m_file);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -609,16 +615,18 @@ inline_mysql_file_fputc(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)
|
||||
(&state, file->m_psi, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 1, src_file, src_line);
|
||||
result= fputc(c, file->m_file);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 1);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker) (&state, file->m_psi, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 1, src_file, src_line);
|
||||
result= fputc(c, file->m_file);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 1);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -635,18 +643,20 @@ inline_mysql_file_fprintf(MYSQL_FILE *file, const char *format, ...)
|
||||
int result;
|
||||
va_list args;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)
|
||||
(&state, file->m_psi, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, __FILE__, __LINE__);
|
||||
va_start(args, format);
|
||||
result= vfprintf(file->m_file, format, args);
|
||||
va_end(args);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) result);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker) (&state, file->m_psi, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, __FILE__, __LINE__);
|
||||
va_start(args, format);
|
||||
result= vfprintf(file->m_file, format, args);
|
||||
va_end(args);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -665,16 +675,18 @@ inline_mysql_file_vfprintf(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)
|
||||
(&state, file->m_psi, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= vfprintf(file->m_file, format, args);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) result);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker) (&state, file->m_psi, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= vfprintf(file->m_file, format, args);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -691,16 +703,18 @@ inline_mysql_file_fflush(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)
|
||||
(&state, file->m_psi, PSI_FILE_FLUSH);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= fflush(file->m_file);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_FLUSH);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= fflush(file->m_file);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -723,16 +737,18 @@ inline_mysql_file_fstat(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
|
||||
(&state, filenr, PSI_FILE_FSTAT);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_fstat(filenr, stat_area, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, filenr, PSI_FILE_FSTAT);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_fstat(filenr, stat_area, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -749,16 +765,18 @@ inline_mysql_file_stat(
|
||||
{
|
||||
MY_STAT *result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_STAT, path, &locker);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||
result= my_stat(path, stat_area, flags);
|
||||
PSI_FILE_CALL(end_file_open_wait)(locker, result);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STAT, path, &locker);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||
result= my_stat(path, stat_area, flags);
|
||||
PSI_FILE_CALL(end_file_open_wait)(locker, result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -775,17 +793,19 @@ inline_mysql_file_chsize(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
|
||||
(&state, file, PSI_FILE_CHSIZE);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) newlength, src_file,
|
||||
src_line);
|
||||
result= my_chsize(file, newlength, filler, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) newlength);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CHSIZE);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) newlength, src_file,
|
||||
src_line);
|
||||
result= my_chsize(file, newlength, filler, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) newlength);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -805,22 +825,24 @@ inline_mysql_file_fopen(
|
||||
if (likely(that != NULL))
|
||||
{
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_STREAM_OPEN, filename, that);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_open_wait)
|
||||
(locker, src_file, src_line);
|
||||
that->m_file= my_fopen(filename, flags, myFlags);
|
||||
that->m_psi= PSI_FILE_CALL(end_file_open_wait)(locker, that->m_file);
|
||||
if (unlikely(that->m_file == NULL))
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STREAM_OPEN,
|
||||
filename, that);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
my_free(that);
|
||||
return NULL;
|
||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||
that->m_file= my_fopen(filename, flags, myFlags);
|
||||
that->m_psi= PSI_FILE_CALL(end_file_open_wait)(locker, that->m_file);
|
||||
if (unlikely(that->m_file == NULL))
|
||||
{
|
||||
my_free(that);
|
||||
return NULL;
|
||||
}
|
||||
return that;
|
||||
}
|
||||
return that;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -846,17 +868,20 @@ inline_mysql_file_fclose(
|
||||
if (likely(file != NULL))
|
||||
{
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)
|
||||
(&state, file->m_psi, PSI_FILE_STREAM_CLOSE);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
||||
result= my_fclose(file->m_file, flags);
|
||||
PSI_FILE_CALL(end_file_close_wait)(locker, result);
|
||||
my_free(file);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi,
|
||||
PSI_FILE_STREAM_CLOSE);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
||||
result= my_fclose(file->m_file, flags);
|
||||
PSI_FILE_CALL(end_file_close_wait)(locker, result);
|
||||
my_free(file);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -875,21 +900,23 @@ inline_mysql_file_fread(
|
||||
{
|
||||
size_t result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes_read;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)
|
||||
(&state, file->m_psi, PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
|
||||
result= my_fread(file->m_file, buffer, count, flags);
|
||||
if (flags & (MY_NABP | MY_FNABP))
|
||||
bytes_read= (result == 0) ? count : 0;
|
||||
else
|
||||
bytes_read= (result != MY_FILE_ERROR) ? result : 0;
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes_read;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
|
||||
result= my_fread(file->m_file, buffer, count, flags);
|
||||
if (flags & (MY_NABP | MY_FNABP))
|
||||
bytes_read= (result == 0) ? count : 0;
|
||||
else
|
||||
bytes_read= (result != MY_FILE_ERROR) ? result : 0;
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -906,21 +933,23 @@ inline_mysql_file_fwrite(
|
||||
{
|
||||
size_t result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes_written;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)
|
||||
(&state, file->m_psi, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
|
||||
result= my_fwrite(file->m_file, buffer, count, flags);
|
||||
if (flags & (MY_NABP | MY_FNABP))
|
||||
bytes_written= (result == 0) ? count : 0;
|
||||
else
|
||||
bytes_written= (result != MY_FILE_ERROR) ? result : 0;
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes_written;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
|
||||
result= my_fwrite(file->m_file, buffer, count, flags);
|
||||
if (flags & (MY_NABP | MY_FNABP))
|
||||
bytes_written= (result == 0) ? count : 0;
|
||||
else
|
||||
bytes_written= (result != MY_FILE_ERROR) ? result : 0;
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -937,16 +966,18 @@ inline_mysql_file_fseek(
|
||||
{
|
||||
my_off_t result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)
|
||||
(&state, file->m_psi, PSI_FILE_SEEK);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_fseek(file->m_file, pos, whence, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_SEEK);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_fseek(file->m_file, pos, whence, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -963,16 +994,18 @@ inline_mysql_file_ftell(
|
||||
{
|
||||
my_off_t result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)
|
||||
(&state, file->m_psi, PSI_FILE_TELL);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_ftell(file->m_file, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_TELL);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_ftell(file->m_file, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -989,16 +1022,19 @@ inline_mysql_file_create(
|
||||
{
|
||||
File file;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_CREATE, filename, &locker);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||
file= my_create(filename, create_flags, access_flags, myFlags);
|
||||
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
|
||||
return file;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename,
|
||||
&locker);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||
file= my_create(filename, create_flags, access_flags, myFlags);
|
||||
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
|
||||
return file;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1035,16 +1071,19 @@ inline_mysql_file_open(
|
||||
{
|
||||
File file;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_OPEN, filename, &locker);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||
file= my_open(filename, flags, myFlags);
|
||||
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
|
||||
return file;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename,
|
||||
&locker);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||
file= my_open(filename, flags, myFlags);
|
||||
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
|
||||
return file;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1061,16 +1100,18 @@ inline_mysql_file_close(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
|
||||
(&state, file, PSI_FILE_CLOSE);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
||||
result= my_close(file, flags);
|
||||
PSI_FILE_CALL(end_file_close_wait)(locker, result);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
||||
result= my_close(file, flags);
|
||||
PSI_FILE_CALL(end_file_close_wait)(locker, result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1087,21 +1128,23 @@ inline_mysql_file_read(
|
||||
{
|
||||
size_t result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes_read;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
|
||||
(&state, file, PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
|
||||
result= my_read(file, buffer, count, flags);
|
||||
if (flags & (MY_NABP | MY_FNABP))
|
||||
bytes_read= (result == 0) ? count : 0;
|
||||
else
|
||||
bytes_read= (result != MY_FILE_ERROR) ? result : 0;
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes_read;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
|
||||
result= my_read(file, buffer, count, flags);
|
||||
if (flags & (MY_NABP | MY_FNABP))
|
||||
bytes_read= (result == 0) ? count : 0;
|
||||
else
|
||||
bytes_read= (result != MY_FILE_ERROR) ? result : 0;
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1118,21 +1161,23 @@ inline_mysql_file_write(
|
||||
{
|
||||
size_t result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes_written;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
|
||||
(&state, file, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
|
||||
result= my_write(file, buffer, count, flags);
|
||||
if (flags & (MY_NABP | MY_FNABP))
|
||||
bytes_written= (result == 0) ? count : 0;
|
||||
else
|
||||
bytes_written= (result != MY_FILE_ERROR) ? result : 0;
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes_written;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
|
||||
result= my_write(file, buffer, count, flags);
|
||||
if (flags & (MY_NABP | MY_FNABP))
|
||||
bytes_written= (result == 0) ? count : 0;
|
||||
else
|
||||
bytes_written= (result != MY_FILE_ERROR) ? result : 0;
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1149,21 +1194,23 @@ inline_mysql_file_pread(
|
||||
{
|
||||
size_t result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes_read;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
|
||||
(&state, file, PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
|
||||
result= my_pread(file, buffer, count, offset, flags);
|
||||
if (flags & (MY_NABP | MY_FNABP))
|
||||
bytes_read= (result == 0) ? count : 0;
|
||||
else
|
||||
bytes_read= (result != MY_FILE_ERROR) ? result : 0;
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes_read;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
|
||||
result= my_pread(file, buffer, count, offset, flags);
|
||||
if (flags & (MY_NABP | MY_FNABP))
|
||||
bytes_read= (result == 0) ? count : 0;
|
||||
else
|
||||
bytes_read= (result != MY_FILE_ERROR) ? result : 0;
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1180,21 +1227,23 @@ inline_mysql_file_pwrite(
|
||||
{
|
||||
size_t result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes_written;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
|
||||
(&state, file, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
|
||||
result= my_pwrite(file, buffer, count, offset, flags);
|
||||
if (flags & (MY_NABP | MY_FNABP))
|
||||
bytes_written= (result == 0) ? count : 0;
|
||||
else
|
||||
bytes_written= (result != MY_FILE_ERROR) ? result : 0;
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
size_t bytes_written;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
|
||||
result= my_pwrite(file, buffer, count, offset, flags);
|
||||
if (flags & (MY_NABP | MY_FNABP))
|
||||
bytes_written= (result == 0) ? count : 0;
|
||||
else
|
||||
bytes_written= (result != MY_FILE_ERROR) ? result : 0;
|
||||
PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1211,16 +1260,18 @@ inline_mysql_file_seek(
|
||||
{
|
||||
my_off_t result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
|
||||
(&state, file, PSI_FILE_SEEK);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_seek(file, pos, whence, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_seek(file, pos, whence, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1237,16 +1288,18 @@ inline_mysql_file_tell(
|
||||
{
|
||||
my_off_t result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
|
||||
(&state, file, PSI_FILE_TELL);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_tell(file, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_TELL);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_tell(file, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1263,16 +1316,18 @@ inline_mysql_file_delete(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_DELETE, name, &locker);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
||||
result= my_delete(name, flags);
|
||||
PSI_FILE_CALL(end_file_close_wait)(locker, result);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, name, &locker);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
||||
result= my_delete(name, flags);
|
||||
PSI_FILE_CALL(end_file_close_wait)(locker, result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1289,16 +1344,18 @@ inline_mysql_file_rename(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_RENAME, to, &locker);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_rename(from, to, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_RENAME, to, &locker);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_rename(from, to, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1317,17 +1374,20 @@ inline_mysql_file_create_with_symlink(
|
||||
{
|
||||
File file;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_CREATE, filename, &locker);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||
file= my_create_with_symlink(linkname, filename, create_flags, access_flags,
|
||||
flags);
|
||||
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
|
||||
return file;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename,
|
||||
&locker);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||
file= my_create_with_symlink(linkname, filename, create_flags, access_flags,
|
||||
flags);
|
||||
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
|
||||
return file;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1348,16 +1408,19 @@ inline_mysql_file_delete_with_symlink(
|
||||
char buf[FN_REFLEN];
|
||||
char *fullname= fn_format(buf, name, "", ext, MY_UNPACK_FILENAME | MY_APPEND_EXT);
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_DELETE, fullname, &locker);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
||||
result= my_handler_delete_with_symlink(fullname, flags);
|
||||
PSI_FILE_CALL(end_file_close_wait)(locker, result);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, fullname,
|
||||
&locker);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
||||
result= my_handler_delete_with_symlink(fullname, flags);
|
||||
PSI_FILE_CALL(end_file_close_wait)(locker, result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1375,16 +1438,18 @@ inline_mysql_file_rename_with_symlink(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_RENAME, to, &locker);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_rename_with_symlink(from, to, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_RENAME, to, &locker);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_rename_with_symlink(from, to, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1401,16 +1466,18 @@ inline_mysql_file_sync(
|
||||
{
|
||||
int result= 0;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)
|
||||
(&state, fd, PSI_FILE_SYNC);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(pfs_enabled))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_sync(fd, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||
result= my_sync(fd, flags);
|
||||
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -82,7 +82,7 @@ inline_mysql_start_idle_wait(PSI_idle_locker_state *state,
|
||||
static inline void
|
||||
inline_mysql_end_idle_wait(struct PSI_idle_locker *locker)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(locker != NULL))
|
||||
PSI_IDLE_CALL(end_idle_wait)(locker);
|
||||
}
|
||||
#endif
|
||||
|
@@ -245,7 +245,7 @@ inline_mysql_start_socket_wait(PSI_socket_locker_state *state,
|
||||
const char *src_file, uint src_line)
|
||||
{
|
||||
struct PSI_socket_locker *locker;
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
locker= PSI_SOCKET_CALL(start_socket_wait)
|
||||
(state, mysql_socket.m_psi, op, byte_count, src_file, src_line);
|
||||
@@ -262,7 +262,7 @@ inline_mysql_start_socket_wait(PSI_socket_locker_state *state,
|
||||
static inline void
|
||||
inline_mysql_end_socket_wait(struct PSI_socket_locker *locker, size_t byte_count)
|
||||
{
|
||||
if (locker != NULL)
|
||||
if (psi_likely(locker != NULL))
|
||||
PSI_SOCKET_CALL(end_socket_wait)(locker, byte_count);
|
||||
}
|
||||
|
||||
@@ -577,7 +577,7 @@ inline_mysql_socket_bind
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker_state state;
|
||||
@@ -617,7 +617,7 @@ inline_mysql_socket_getsockname
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker *locker;
|
||||
@@ -655,7 +655,7 @@ inline_mysql_socket_connect
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker *locker;
|
||||
@@ -693,7 +693,7 @@ inline_mysql_socket_getpeername
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker *locker;
|
||||
@@ -731,7 +731,7 @@ inline_mysql_socket_send
|
||||
ssize_t result;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker *locker;
|
||||
@@ -772,7 +772,7 @@ inline_mysql_socket_recv
|
||||
ssize_t result;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker *locker;
|
||||
@@ -813,7 +813,7 @@ inline_mysql_socket_sendto
|
||||
ssize_t result;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker *locker;
|
||||
@@ -855,7 +855,7 @@ inline_mysql_socket_recvfrom
|
||||
ssize_t result;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker *locker;
|
||||
@@ -896,7 +896,7 @@ inline_mysql_socket_getsockopt
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker *locker;
|
||||
@@ -935,7 +935,7 @@ inline_mysql_socket_setsockopt
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi)
|
||||
if (psi_likely(mysql_socket.m_psi))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker *locker;
|
||||
@@ -973,7 +973,7 @@ inline_mysql_socket_listen
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker *locker;
|
||||
@@ -1087,7 +1087,7 @@ inline_mysql_socket_close
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_socket_locker *locker;
|
||||
@@ -1142,7 +1142,7 @@ inline_mysql_socket_shutdown
|
||||
|
||||
/* Instrumentation start */
|
||||
#ifdef HAVE_PSI_SOCKET_INTERFACE
|
||||
if (mysql_socket.m_psi != NULL)
|
||||
if (psi_likely(mysql_socket.m_psi != NULL))
|
||||
{
|
||||
PSI_socket_locker *locker;
|
||||
PSI_socket_locker_state state;
|
||||
|
@@ -127,7 +127,7 @@ inline_mysql_digest_start(PSI_statement_locker *locker)
|
||||
{
|
||||
PSI_digest_locker* digest_locker= NULL;
|
||||
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(locker != NULL))
|
||||
digest_locker= PSI_DIGEST_CALL(digest_start)(locker);
|
||||
return digest_locker;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ inline_mysql_digest_start(PSI_statement_locker *locker)
|
||||
static inline void
|
||||
inline_mysql_digest_end(PSI_digest_locker *locker, const sql_digest_storage *digest)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(locker != NULL))
|
||||
PSI_DIGEST_CALL(digest_end)(locker, digest);
|
||||
}
|
||||
#endif
|
||||
@@ -151,7 +151,7 @@ inline_mysql_start_statement(PSI_statement_locker_state *state,
|
||||
{
|
||||
PSI_statement_locker *locker;
|
||||
locker= PSI_STATEMENT_CALL(get_thread_statement_locker)(state, key, charset);
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(locker != NULL))
|
||||
PSI_STATEMENT_CALL(start_statement)(locker, db, (uint)db_len, src_file, src_line);
|
||||
return locker;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ static inline struct PSI_statement_locker *
|
||||
inline_mysql_refine_statement(PSI_statement_locker *locker,
|
||||
PSI_statement_key key)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(locker != NULL))
|
||||
{
|
||||
locker= PSI_STATEMENT_CALL(refine_statement)(locker, key);
|
||||
}
|
||||
@@ -171,7 +171,7 @@ static inline void
|
||||
inline_mysql_set_statement_text(PSI_statement_locker *locker,
|
||||
const char *text, uint text_len)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(locker != NULL))
|
||||
{
|
||||
PSI_STATEMENT_CALL(set_statement_text)(locker, text, text_len);
|
||||
}
|
||||
@@ -181,7 +181,7 @@ static inline void
|
||||
inline_mysql_set_statement_lock_time(PSI_statement_locker *locker,
|
||||
ulonglong count)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(locker != NULL))
|
||||
{
|
||||
PSI_STATEMENT_CALL(set_statement_lock_time)(locker, count);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ static inline void
|
||||
inline_mysql_set_statement_rows_sent(PSI_statement_locker *locker,
|
||||
ulonglong count)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(locker != NULL))
|
||||
{
|
||||
PSI_STATEMENT_CALL(set_statement_rows_sent)(locker, count);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ static inline void
|
||||
inline_mysql_set_statement_rows_examined(PSI_statement_locker *locker,
|
||||
ulonglong count)
|
||||
{
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(locker != NULL))
|
||||
{
|
||||
PSI_STATEMENT_CALL(set_statement_rows_examined)(locker, count);
|
||||
}
|
||||
@@ -212,7 +212,7 @@ inline_mysql_end_statement(struct PSI_statement_locker *locker,
|
||||
Diagnostics_area *stmt_da)
|
||||
{
|
||||
PSI_STAGE_CALL(end_stage)();
|
||||
if (likely(locker != NULL))
|
||||
if (psi_likely(locker != NULL))
|
||||
PSI_STATEMENT_CALL(end_statement)(locker, stmt_da);
|
||||
}
|
||||
#endif
|
||||
|
@@ -87,7 +87,7 @@
|
||||
#ifdef HAVE_PSI_TABLE_INTERFACE
|
||||
#define MYSQL_TABLE_IO_WAIT(PSI, OP, INDEX, FLAGS, PAYLOAD) \
|
||||
{ \
|
||||
if (PSI != NULL) \
|
||||
if (psi_likely(PSI != NULL)) \
|
||||
{ \
|
||||
PSI_table_locker *locker; \
|
||||
PSI_table_locker_state state; \
|
||||
@@ -120,7 +120,7 @@
|
||||
#ifdef HAVE_PSI_TABLE_INTERFACE
|
||||
#define MYSQL_TABLE_LOCK_WAIT(PSI, OP, FLAGS, PAYLOAD) \
|
||||
{ \
|
||||
if (PSI != NULL) \
|
||||
if (psi_likely(PSI != NULL)) \
|
||||
{ \
|
||||
PSI_table_locker *locker; \
|
||||
PSI_table_locker_state state; \
|
||||
@@ -186,7 +186,7 @@ inline_mysql_start_table_lock_wait(PSI_table_locker_state *state,
|
||||
enum PSI_table_lock_operation op,
|
||||
ulong flags, const char *src_file, uint src_line)
|
||||
{
|
||||
if (psi != NULL)
|
||||
if (psi_likely(psi != NULL))
|
||||
{
|
||||
struct PSI_table_locker *locker;
|
||||
locker= PSI_TABLE_CALL(start_table_lock_wait)
|
||||
@@ -203,7 +203,7 @@ inline_mysql_start_table_lock_wait(PSI_table_locker_state *state,
|
||||
static inline void
|
||||
inline_mysql_end_table_lock_wait(struct PSI_table_locker *locker)
|
||||
{
|
||||
if (locker != NULL)
|
||||
if (psi_likely(locker != NULL))
|
||||
PSI_TABLE_CALL(end_table_lock_wait)(locker);
|
||||
}
|
||||
#endif
|
||||
|
@@ -682,7 +682,7 @@ static inline int inline_mysql_mutex_lock(
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_MUTEX_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_mutex_locker *locker;
|
||||
@@ -725,7 +725,7 @@ static inline int inline_mysql_mutex_trylock(
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_MUTEX_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_mutex_locker *locker;
|
||||
@@ -768,7 +768,7 @@ static inline int inline_mysql_mutex_unlock(
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_MUTEX_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
PSI_MUTEX_CALL(unlock_mutex)(that->m_psi);
|
||||
#endif
|
||||
|
||||
@@ -835,7 +835,7 @@ static inline int inline_mysql_rwlock_destroy(
|
||||
mysql_rwlock_t *that)
|
||||
{
|
||||
#ifdef HAVE_PSI_RWLOCK_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
PSI_RWLOCK_CALL(destroy_rwlock)(that->m_psi);
|
||||
that->m_psi= NULL;
|
||||
@@ -849,7 +849,7 @@ static inline int inline_mysql_prlock_destroy(
|
||||
mysql_prlock_t *that)
|
||||
{
|
||||
#ifdef HAVE_PSI_RWLOCK_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
PSI_RWLOCK_CALL(destroy_rwlock)(that->m_psi);
|
||||
that->m_psi= NULL;
|
||||
@@ -869,7 +869,7 @@ static inline int inline_mysql_rwlock_rdlock(
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_RWLOCK_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_rwlock_locker *locker;
|
||||
@@ -905,7 +905,7 @@ static inline int inline_mysql_prlock_rdlock(
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_RWLOCK_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_rwlock_locker *locker;
|
||||
@@ -941,7 +941,7 @@ static inline int inline_mysql_rwlock_wrlock(
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_RWLOCK_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_rwlock_locker *locker;
|
||||
@@ -977,7 +977,7 @@ static inline int inline_mysql_prlock_wrlock(
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_RWLOCK_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_rwlock_locker *locker;
|
||||
@@ -1013,7 +1013,7 @@ static inline int inline_mysql_rwlock_tryrdlock(
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_RWLOCK_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_rwlock_locker *locker;
|
||||
@@ -1048,7 +1048,7 @@ static inline int inline_mysql_rwlock_trywrlock(
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_RWLOCK_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_rwlock_locker *locker;
|
||||
@@ -1078,7 +1078,7 @@ static inline int inline_mysql_rwlock_unlock(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_RWLOCK_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
PSI_RWLOCK_CALL(unlock_rwlock)(that->m_psi);
|
||||
#endif
|
||||
result= rw_unlock(&that->m_rwlock);
|
||||
@@ -1091,7 +1091,7 @@ static inline int inline_mysql_prlock_unlock(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_RWLOCK_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
PSI_RWLOCK_CALL(unlock_rwlock)(that->m_psi);
|
||||
#endif
|
||||
result= rw_pr_unlock(&that->m_prlock);
|
||||
@@ -1135,7 +1135,7 @@ static inline int inline_mysql_cond_destroy(
|
||||
mysql_cond_t *that)
|
||||
{
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
PSI_COND_CALL(destroy_cond)(that->m_psi);
|
||||
that->m_psi= NULL;
|
||||
@@ -1155,7 +1155,7 @@ static inline int inline_mysql_cond_wait(
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_cond_locker *locker;
|
||||
@@ -1192,7 +1192,7 @@ static inline int inline_mysql_cond_timedwait(
|
||||
int result;
|
||||
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
{
|
||||
/* Instrumentation start */
|
||||
PSI_cond_locker *locker;
|
||||
@@ -1204,7 +1204,7 @@ static inline int inline_mysql_cond_timedwait(
|
||||
result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime);
|
||||
|
||||
/* Instrumentation end */
|
||||
if (locker != NULL)
|
||||
if (psi_likely(locker != NULL))
|
||||
PSI_COND_CALL(end_cond_wait)(locker, result);
|
||||
|
||||
return result;
|
||||
@@ -1222,7 +1222,7 @@ static inline int inline_mysql_cond_signal(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
PSI_COND_CALL(signal_cond)(that->m_psi);
|
||||
#endif
|
||||
result= pthread_cond_signal(&that->m_cond);
|
||||
@@ -1234,7 +1234,7 @@ static inline int inline_mysql_cond_broadcast(
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_COND_INTERFACE
|
||||
if (that->m_psi != NULL)
|
||||
if (psi_likely(that->m_psi != NULL))
|
||||
PSI_COND_CALL(broadcast_cond)(that->m_psi);
|
||||
#endif
|
||||
result= pthread_cond_broadcast(&that->m_cond);
|
||||
|
@@ -40,6 +40,21 @@
|
||||
#error "You must include my_global.h in the code for the build to be correct."
|
||||
#endif
|
||||
|
||||
/*
|
||||
If PSI_ON_BY_DFAULT is defined, assume PSI will be enabled by default and
|
||||
optimize jumps testing for PSI this case. If not, optimize the binary for
|
||||
that PSI is not enabled
|
||||
*/
|
||||
|
||||
#ifdef PSI_ON_BY_DEFAULT
|
||||
#define psi_likely(A) likely(A)
|
||||
#define psi_unlikely(A) unlikely(A)
|
||||
#else
|
||||
#define psi_likely(A) unlikely(A)
|
||||
#define psi_unlikely(A) likely(A)
|
||||
#endif
|
||||
|
||||
|
||||
C_MODE_START
|
||||
|
||||
struct TABLE_SHARE;
|
||||
@@ -2346,6 +2361,7 @@ typedef struct PSI_stage_info_none PSI_stage_info;
|
||||
|
||||
#endif /* HAVE_PSI_INTERFACE */
|
||||
|
||||
extern MYSQL_PLUGIN_IMPORT my_bool pfs_enabled;
|
||||
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
|
||||
|
||||
/*
|
||||
|
@@ -616,5 +616,6 @@ typedef struct PSI_file_locker_state_v1 PSI_file_locker_state;
|
||||
typedef struct PSI_table_locker_state_v1 PSI_table_locker_state;
|
||||
typedef struct PSI_statement_locker_state_v1 PSI_statement_locker_state;
|
||||
typedef struct PSI_socket_locker_state_v1 PSI_socket_locker_state;
|
||||
extern MYSQL_PLUGIN_IMPORT my_bool pfs_enabled;
|
||||
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
|
||||
C_MODE_END
|
||||
|
@@ -209,5 +209,6 @@ typedef struct PSI_file_locker_state_v2 PSI_file_locker_state;
|
||||
typedef struct PSI_table_locker_state_v2 PSI_table_locker_state;
|
||||
typedef struct PSI_statement_locker_state_v2 PSI_statement_locker_state;
|
||||
typedef struct PSI_socket_locker_state_v2 PSI_socket_locker_state;
|
||||
extern MYSQL_PLUGIN_IMPORT my_bool pfs_enabled;
|
||||
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
|
||||
C_MODE_END
|
||||
|
Reference in New Issue
Block a user