MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / inline_mysql_file_fclose

Function inline_mysql_file_fclose

include/mysql/psi/mysql_file.h:855–884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853}
854
855static inline int
856inline_mysql_file_fclose(
857#ifdef HAVE_PSI_FILE_INTERFACE
858 const char *src_file, uint src_line,
859#endif
860 MYSQL_FILE *file, myf flags)
861{
862 int result= 0;
863 if (likely(file != NULL))
864 {
865#ifdef HAVE_PSI_FILE_INTERFACE
866 struct PSI_file_locker *locker;
867 PSI_file_locker_state state;
868 locker= PSI_FILE_CALL(get_thread_file_stream_locker)
869 (&state, file->m_psi, PSI_FILE_STREAM_CLOSE);
870 if (likely(locker != NULL))
871 {
872 PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
873 result= my_fclose(file->m_file, flags);
874 PSI_FILE_CALL(end_file_close_wait)(locker, result);
875 my_free(file);
876 return result;
877 }
878#endif
879
880 result= my_fclose(file->m_file, flags);
881 my_free(file);
882 }
883 return result;
884}
885
886static inline size_t
887inline_mysql_file_fread(

Callers

nothing calls this directly

Calls 2

my_fcloseFunction · 0.85
my_freeFunction · 0.85

Tested by

no test coverage detected