| 915 | } |
| 916 | |
| 917 | static inline size_t |
| 918 | inline_mysql_file_fwrite( |
| 919 | #ifdef HAVE_PSI_FILE_INTERFACE |
| 920 | const char *src_file, uint src_line, |
| 921 | #endif |
| 922 | MYSQL_FILE *file, const uchar *buffer, size_t count, myf flags) |
| 923 | { |
| 924 | size_t result; |
| 925 | #ifdef HAVE_PSI_FILE_INTERFACE |
| 926 | struct PSI_file_locker *locker; |
| 927 | PSI_file_locker_state state; |
| 928 | size_t bytes_written; |
| 929 | locker= PSI_FILE_CALL(get_thread_file_stream_locker) |
| 930 | (&state, file->m_psi, PSI_FILE_WRITE); |
| 931 | if (likely(locker != NULL)) |
| 932 | { |
| 933 | PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); |
| 934 | result= my_fwrite(file->m_file, buffer, count, flags); |
| 935 | if (flags & (MY_NABP | MY_FNABP)) |
| 936 | bytes_written= (result == 0) ? count : 0; |
| 937 | else |
| 938 | bytes_written= (result != MY_FILE_ERROR) ? result : 0; |
| 939 | PSI_FILE_CALL(end_file_wait)(locker, bytes_written); |
| 940 | return result; |
| 941 | } |
| 942 | #endif |
| 943 | |
| 944 | result= my_fwrite(file->m_file, buffer, count, flags); |
| 945 | return result; |
| 946 | } |
| 947 | |
| 948 | static inline my_off_t |
| 949 | inline_mysql_file_fseek( |
nothing calls this directly
no test coverage detected