/src/server/include/mysql/psi/mysql_file.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* Copyright (c) 2008, 2023, Oracle and/or its affiliates. |
2 | | |
3 | | This program is free software; you can redistribute it and/or modify |
4 | | it under the terms of the GNU General Public License, version 2.0, |
5 | | as published by the Free Software Foundation. |
6 | | |
7 | | This program is also distributed with certain software (including |
8 | | but not limited to OpenSSL) that is licensed under separate terms, |
9 | | as designated in a particular file or component or in included license |
10 | | documentation. The authors of MySQL hereby grant you an additional |
11 | | permission to link the program and your derivative works with the |
12 | | separately licensed software that they have included with MySQL. |
13 | | |
14 | | This program is distributed in the hope that it will be useful, |
15 | | but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | | GNU General Public License, version 2.0, for more details. |
18 | | |
19 | | You should have received a copy of the GNU General Public License |
20 | | along with this program; if not, write to the Free Software Foundation, |
21 | | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ |
22 | | |
23 | | #ifndef MYSQL_FILE_H |
24 | | #define MYSQL_FILE_H |
25 | | |
26 | | /* For strlen() */ |
27 | | #include <string.h> |
28 | | /* For MY_STAT */ |
29 | | #include <my_dir.h> |
30 | | /* For my_chsize */ |
31 | | #include <my_sys.h> |
32 | | |
33 | | /** |
34 | | @file mysql/psi/mysql_file.h |
35 | | Instrumentation helpers for mysys file io. |
36 | | This header file provides the necessary declarations |
37 | | to use the mysys file API with the performance schema instrumentation. |
38 | | In some compilers (SunStudio), 'static inline' functions, when declared |
39 | | but not used, are not optimized away (because they are unused) by default, |
40 | | so that including a static inline function from a header file does |
41 | | create unwanted dependencies, causing unresolved symbols at link time. |
42 | | Other compilers, like gcc, optimize these dependencies by default. |
43 | | |
44 | | Since the instrumented APIs declared here are wrapper on top |
45 | | of mysys file io APIs, including mysql/psi/mysql_file.h assumes that |
46 | | the dependency on my_sys already exists. |
47 | | */ |
48 | | |
49 | | #include "mysql/psi/psi.h" |
50 | | |
51 | | #ifndef PSI_FILE_CALL |
52 | 0 | #define PSI_FILE_CALL(M) PSI_DYNAMIC_CALL(M) |
53 | | #endif |
54 | | |
55 | | /** |
56 | | @defgroup File_instrumentation File Instrumentation |
57 | | @ingroup Instrumentation_interface |
58 | | @{ |
59 | | */ |
60 | | |
61 | | /** |
62 | | @def mysql_file_register(P1, P2, P3) |
63 | | File registration. |
64 | | */ |
65 | | #define mysql_file_register(P1, P2, P3) \ |
66 | 0 | inline_mysql_file_register(P1, P2, P3) |
67 | | |
68 | | /** |
69 | | @def mysql_file_fgets(P1, P2, F) |
70 | | Instrumented fgets. |
71 | | @c mysql_file_fgets is a replacement for @c fgets. |
72 | | */ |
73 | | #ifdef HAVE_PSI_FILE_INTERFACE |
74 | | #define mysql_file_fgets(P1, P2, F) \ |
75 | | inline_mysql_file_fgets(__FILE__, __LINE__, P1, P2, F) |
76 | | #else |
77 | | #define mysql_file_fgets(P1, P2, F) \ |
78 | | inline_mysql_file_fgets(P1, P2, F) |
79 | | #endif |
80 | | |
81 | | /** |
82 | | @def mysql_file_fgetc(F) |
83 | | Instrumented fgetc. |
84 | | @c mysql_file_fgetc is a replacement for @c fgetc. |
85 | | */ |
86 | | #ifdef HAVE_PSI_FILE_INTERFACE |
87 | | #define mysql_file_fgetc(F) inline_mysql_file_fgetc(__FILE__, __LINE__, F) |
88 | | #else |
89 | | #define mysql_file_fgetc(F) inline_mysql_file_fgetc(F) |
90 | | #endif |
91 | | |
92 | | /** |
93 | | @def mysql_file_fputs(P1, F) |
94 | | Instrumented fputs. |
95 | | @c mysql_file_fputs is a replacement for @c fputs. |
96 | | */ |
97 | | #ifdef HAVE_PSI_FILE_INTERFACE |
98 | | #define mysql_file_fputs(P1, F) \ |
99 | | inline_mysql_file_fputs(__FILE__, __LINE__, P1, F) |
100 | | #else |
101 | | #define mysql_file_fputs(P1, F)\ |
102 | | inline_mysql_file_fputs(P1, F) |
103 | | #endif |
104 | | |
105 | | /** |
106 | | @def mysql_file_fputc(P1, F) |
107 | | Instrumented fputc. |
108 | | @c mysql_file_fputc is a replacement for @c fputc. |
109 | | */ |
110 | | #ifdef HAVE_PSI_FILE_INTERFACE |
111 | | #define mysql_file_fputc(P1, F) \ |
112 | | inline_mysql_file_fputc(__FILE__, __LINE__, P1, F) |
113 | | #else |
114 | | #define mysql_file_fputc(P1, F) \ |
115 | | inline_mysql_file_fputc(P1, F) |
116 | | #endif |
117 | | |
118 | | /** |
119 | | @def mysql_file_fprintf |
120 | | Instrumented fprintf. |
121 | | @c mysql_file_fprintf is a replacement for @c fprintf. |
122 | | */ |
123 | | #define mysql_file_fprintf inline_mysql_file_fprintf |
124 | | |
125 | | /** |
126 | | @def mysql_file_vfprintf(F, P1, P2) |
127 | | Instrumented vfprintf. |
128 | | @c mysql_file_vfprintf is a replacement for @c vfprintf. |
129 | | */ |
130 | | #ifdef HAVE_PSI_FILE_INTERFACE |
131 | | #define mysql_file_vfprintf(F, P1, P2) \ |
132 | | inline_mysql_file_vfprintf(__FILE__, __LINE__, F, P1, P2) |
133 | | #else |
134 | | #define mysql_file_vfprintf(F, P1, P2) \ |
135 | | inline_mysql_file_vfprintf(F, P1, P2) |
136 | | #endif |
137 | | |
138 | | /** |
139 | | @def mysql_file_fflush(F, P1, P2) |
140 | | Instrumented fflush. |
141 | | @c mysql_file_fflush is a replacement for @c fflush. |
142 | | */ |
143 | | #ifdef HAVE_PSI_FILE_INTERFACE |
144 | | #define mysql_file_fflush(F) \ |
145 | | inline_mysql_file_fflush(__FILE__, __LINE__, F) |
146 | | #else |
147 | | #define mysql_file_fflush(F) \ |
148 | | inline_mysql_file_fflush(F) |
149 | | #endif |
150 | | |
151 | | /** |
152 | | @def mysql_file_feof(F) |
153 | | Instrumented feof. |
154 | | @c mysql_file_feof is a replacement for @c feof. |
155 | | */ |
156 | | #define mysql_file_feof(F) inline_mysql_file_feof(F) |
157 | | |
158 | | /** |
159 | | @def mysql_file_fstat(FN, S, FL) |
160 | | Instrumented fstat. |
161 | | @c mysql_file_fstat is a replacement for @c my_fstat. |
162 | | */ |
163 | | #ifdef HAVE_PSI_FILE_INTERFACE |
164 | | #define mysql_file_fstat(FN, S, FL) \ |
165 | | inline_mysql_file_fstat(__FILE__, __LINE__, FN, S, FL) |
166 | | #else |
167 | | #define mysql_file_fstat(FN, S, FL) \ |
168 | | inline_mysql_file_fstat(FN, S, FL) |
169 | | #endif |
170 | | |
171 | | /** |
172 | | @def mysql_file_stat(K, FN, S, FL) |
173 | | Instrumented stat. |
174 | | @c mysql_file_stat is a replacement for @c my_stat. |
175 | | */ |
176 | | #ifdef HAVE_PSI_FILE_INTERFACE |
177 | | #define mysql_file_stat(K, FN, S, FL) \ |
178 | | inline_mysql_file_stat(K, __FILE__, __LINE__, FN, S, FL) |
179 | | #else |
180 | | #define mysql_file_stat(K, FN, S, FL) \ |
181 | | inline_mysql_file_stat(FN, S, FL) |
182 | | #endif |
183 | | |
184 | | /** |
185 | | @def mysql_file_chsize(F, P1, P2, P3) |
186 | | Instrumented chsize. |
187 | | @c mysql_file_chsize is a replacement for @c my_chsize. |
188 | | */ |
189 | | #ifdef HAVE_PSI_FILE_INTERFACE |
190 | | #define mysql_file_chsize(F, P1, P2, P3) \ |
191 | | inline_mysql_file_chsize(__FILE__, __LINE__, F, P1, P2, P3) |
192 | | #else |
193 | | #define mysql_file_chsize(F, P1, P2, P3) \ |
194 | | inline_mysql_file_chsize(F, P1, P2, P3) |
195 | | #endif |
196 | | |
197 | | /** |
198 | | @def mysql_file_fopen(K, N, F1, F2) |
199 | | Instrumented fopen. |
200 | | @c mysql_file_fopen is a replacement for @c my_fopen. |
201 | | */ |
202 | | #ifdef HAVE_PSI_FILE_INTERFACE |
203 | | #define mysql_file_fopen(K, N, F1, F2) \ |
204 | | inline_mysql_file_fopen(K, __FILE__, __LINE__, N, F1, F2) |
205 | | #else |
206 | | #define mysql_file_fopen(K, N, F1, F2) \ |
207 | | inline_mysql_file_fopen(N, F1, F2) |
208 | | #endif |
209 | | |
210 | | /** |
211 | | @def mysql_file_fclose(FD, FL) |
212 | | Instrumented fclose. |
213 | | @c mysql_file_fclose is a replacement for @c my_fclose. |
214 | | Without the instrumentation, this call will have the same behavior as the |
215 | | undocumented and possibly platform specific my_fclose(NULL, ...) behavior. |
216 | | With the instrumentation, mysql_fclose(NULL, ...) will safely return 0, |
217 | | which is an extension compared to my_fclose and is therefore compliant. |
218 | | mysql_fclose is on purpose *not* implementing |
219 | | @code assert(file != NULL) @endcode, |
220 | | since doing so could introduce regressions. |
221 | | */ |
222 | | #ifdef HAVE_PSI_FILE_INTERFACE |
223 | | #define mysql_file_fclose(FD, FL) \ |
224 | | inline_mysql_file_fclose(__FILE__, __LINE__, FD, FL) |
225 | | #else |
226 | | #define mysql_file_fclose(FD, FL) \ |
227 | | inline_mysql_file_fclose(FD, FL) |
228 | | #endif |
229 | | |
230 | | /** |
231 | | @def mysql_file_fread(FD, P1, P2, P3) |
232 | | Instrumented fread. |
233 | | @c mysql_file_fread is a replacement for @c my_fread. |
234 | | */ |
235 | | #ifdef HAVE_PSI_FILE_INTERFACE |
236 | | #define mysql_file_fread(FD, P1, P2, P3) \ |
237 | | inline_mysql_file_fread(__FILE__, __LINE__, FD, P1, P2, P3) |
238 | | #else |
239 | | #define mysql_file_fread(FD, P1, P2, P3) \ |
240 | | inline_mysql_file_fread(FD, P1, P2, P3) |
241 | | #endif |
242 | | |
243 | | /** |
244 | | @def mysql_file_fwrite(FD, P1, P2, P3) |
245 | | Instrumented fwrite. |
246 | | @c mysql_file_fwrite is a replacement for @c my_fwrite. |
247 | | */ |
248 | | #ifdef HAVE_PSI_FILE_INTERFACE |
249 | | #define mysql_file_fwrite(FD, P1, P2, P3) \ |
250 | | inline_mysql_file_fwrite(__FILE__, __LINE__, FD, P1, P2, P3) |
251 | | #else |
252 | | #define mysql_file_fwrite(FD, P1, P2, P3) \ |
253 | | inline_mysql_file_fwrite(FD, P1, P2, P3) |
254 | | #endif |
255 | | |
256 | | /** |
257 | | @def mysql_file_fseek(FD, P, W, F) |
258 | | Instrumented fseek. |
259 | | @c mysql_file_fseek is a replacement for @c my_fseek. |
260 | | */ |
261 | | #ifdef HAVE_PSI_FILE_INTERFACE |
262 | | #define mysql_file_fseek(FD, P, W, F) \ |
263 | | inline_mysql_file_fseek(__FILE__, __LINE__, FD, P, W, F) |
264 | | #else |
265 | | #define mysql_file_fseek(FD, P, W, F) \ |
266 | | inline_mysql_file_fseek(FD, P, W, F) |
267 | | #endif |
268 | | |
269 | | /** |
270 | | @def mysql_file_ftell(FD, F) |
271 | | Instrumented ftell. |
272 | | @c mysql_file_ftell is a replacement for @c my_ftell. |
273 | | */ |
274 | | #ifdef HAVE_PSI_FILE_INTERFACE |
275 | | #define mysql_file_ftell(FD, F) \ |
276 | | inline_mysql_file_ftell(__FILE__, __LINE__, FD, F) |
277 | | #else |
278 | | #define mysql_file_ftell(FD, F) \ |
279 | | inline_mysql_file_ftell(FD, F) |
280 | | #endif |
281 | | |
282 | | /** |
283 | | @def mysql_file_create(K, N, F1, F2, F3) |
284 | | Instrumented create. |
285 | | @c mysql_file_create is a replacement for @c my_create. |
286 | | */ |
287 | | #ifdef HAVE_PSI_FILE_INTERFACE |
288 | | #define mysql_file_create(K, N, F1, F2, F3) \ |
289 | | inline_mysql_file_create(K, __FILE__, __LINE__, N, F1, F2, F3) |
290 | | #else |
291 | | #define mysql_file_create(K, N, F1, F2, F3) \ |
292 | | inline_mysql_file_create(N, F1, F2, F3) |
293 | | #endif |
294 | | |
295 | | /** |
296 | | @def mysql_file_create_temp(K, T, D, P, M, F) |
297 | | Instrumented create_temp_file. |
298 | | @c mysql_file_create_temp is a replacement for @c create_temp_file. |
299 | | */ |
300 | | #ifdef HAVE_PSI_FILE_INTERFACE |
301 | | #define mysql_file_create_temp(K, T, D, P, M, F) \ |
302 | | inline_mysql_file_create_temp(K, __FILE__, __LINE__, T, D, P, M, F) |
303 | | #else |
304 | | #define mysql_file_create_temp(K, T, D, P, M, F) \ |
305 | | inline_mysql_file_create_temp(T, D, P, M, F) |
306 | | #endif |
307 | | |
308 | | /** |
309 | | @def mysql_file_open(K, N, F1, F2) |
310 | | Instrumented open. |
311 | | @c mysql_file_open is a replacement for @c my_open. |
312 | | */ |
313 | | #ifdef HAVE_PSI_FILE_INTERFACE |
314 | | #define mysql_file_open(K, N, F1, F2) \ |
315 | 0 | inline_mysql_file_open(K, __FILE__, __LINE__, N, F1, F2) |
316 | | #else |
317 | | #define mysql_file_open(K, N, F1, F2) \ |
318 | | inline_mysql_file_open(N, F1, F2) |
319 | | #endif |
320 | | |
321 | | /** |
322 | | @def mysql_file_close(FD, F) |
323 | | Instrumented close. |
324 | | @c mysql_file_close is a replacement for @c my_close. |
325 | | */ |
326 | | #ifdef HAVE_PSI_FILE_INTERFACE |
327 | | #define mysql_file_close(FD, F) \ |
328 | 0 | inline_mysql_file_close(__FILE__, __LINE__, FD, F) |
329 | | #else |
330 | | #define mysql_file_close(FD, F) \ |
331 | | inline_mysql_file_close(FD, F) |
332 | | #endif |
333 | | |
334 | | /** |
335 | | @def mysql_file_read(FD, B, S, F) |
336 | | Instrumented read. |
337 | | @c mysql_read is a replacement for @c my_read. |
338 | | */ |
339 | | #ifdef HAVE_PSI_FILE_INTERFACE |
340 | | #define mysql_file_read(FD, B, S, F) \ |
341 | 0 | inline_mysql_file_read(__FILE__, __LINE__, FD, B, S, F) |
342 | | #else |
343 | | #define mysql_file_read(FD, B, S, F) \ |
344 | | inline_mysql_file_read(FD, B, S, F) |
345 | | #endif |
346 | | |
347 | | /** |
348 | | @def mysql_file_write(FD, B, S, F) |
349 | | Instrumented write. |
350 | | @c mysql_file_write is a replacement for @c my_write. |
351 | | */ |
352 | | #ifdef HAVE_PSI_FILE_INTERFACE |
353 | | #define mysql_file_write(FD, B, S, F) \ |
354 | | inline_mysql_file_write(__FILE__, __LINE__, FD, B, S, F) |
355 | | #else |
356 | | #define mysql_file_write(FD, B, S, F) \ |
357 | | inline_mysql_file_write(FD, B, S, F) |
358 | | #endif |
359 | | |
360 | | /** |
361 | | @def mysql_file_pread(FD, B, S, O, F) |
362 | | Instrumented pread. |
363 | | @c mysql_pread is a replacement for @c my_pread. |
364 | | */ |
365 | | #ifdef HAVE_PSI_FILE_INTERFACE |
366 | | #define mysql_file_pread(FD, B, S, O, F) \ |
367 | | inline_mysql_file_pread(__FILE__, __LINE__, FD, B, S, O, F) |
368 | | #else |
369 | | #define mysql_file_pread(FD, B, S, O, F) \ |
370 | | inline_mysql_file_pread(FD, B, S, O, F) |
371 | | #endif |
372 | | |
373 | | /** |
374 | | @def mysql_file_pwrite(FD, B, S, O, F) |
375 | | Instrumented pwrite. |
376 | | @c mysql_file_pwrite is a replacement for @c my_pwrite. |
377 | | */ |
378 | | #ifdef HAVE_PSI_FILE_INTERFACE |
379 | | #define mysql_file_pwrite(FD, B, S, O, F) \ |
380 | | inline_mysql_file_pwrite(__FILE__, __LINE__, FD, B, S, O, F) |
381 | | #else |
382 | | #define mysql_file_pwrite(FD, B, S, O, F) \ |
383 | | inline_mysql_file_pwrite(FD, B, S, O, F) |
384 | | #endif |
385 | | |
386 | | /** |
387 | | @def mysql_file_seek(FD, P, W, F) |
388 | | Instrumented seek. |
389 | | @c mysql_file_seek is a replacement for @c my_seek. |
390 | | */ |
391 | | #ifdef HAVE_PSI_FILE_INTERFACE |
392 | | #define mysql_file_seek(FD, P, W, F) \ |
393 | | inline_mysql_file_seek(__FILE__, __LINE__, FD, P, W, F) |
394 | | #else |
395 | | #define mysql_file_seek(FD, P, W, F) \ |
396 | | inline_mysql_file_seek(FD, P, W, F) |
397 | | #endif |
398 | | |
399 | | /** |
400 | | @def mysql_file_tell(FD, F) |
401 | | Instrumented tell. |
402 | | @c mysql_file_tell is a replacement for @c my_tell. |
403 | | */ |
404 | | #ifdef HAVE_PSI_FILE_INTERFACE |
405 | | #define mysql_file_tell(FD, F) \ |
406 | | inline_mysql_file_tell(__FILE__, __LINE__, FD, F) |
407 | | #else |
408 | | #define mysql_file_tell(FD, F) \ |
409 | | inline_mysql_file_tell(FD, F) |
410 | | #endif |
411 | | |
412 | | /** |
413 | | @def mysql_file_delete(K, P1, P2) |
414 | | Instrumented delete. |
415 | | @c mysql_file_delete is a replacement for @c my_delete. |
416 | | */ |
417 | | #ifdef HAVE_PSI_FILE_INTERFACE |
418 | | #define mysql_file_delete(K, P1, P2) \ |
419 | | inline_mysql_file_delete(K, __FILE__, __LINE__, P1, P2) |
420 | | #else |
421 | | #define mysql_file_delete(K, P1, P2) \ |
422 | | inline_mysql_file_delete(P1, P2) |
423 | | #endif |
424 | | |
425 | | /** |
426 | | @def mysql_file_rename(K, P1, P2, P3) |
427 | | Instrumented rename. |
428 | | @c mysql_file_rename is a replacement for @c my_rename. |
429 | | */ |
430 | | #ifdef HAVE_PSI_FILE_INTERFACE |
431 | | #define mysql_file_rename(K, P1, P2, P3) \ |
432 | | inline_mysql_file_rename(K, __FILE__, __LINE__, P1, P2, P3) |
433 | | #else |
434 | | #define mysql_file_rename(K, P1, P2, P3) \ |
435 | | inline_mysql_file_rename(P1, P2, P3) |
436 | | #endif |
437 | | |
438 | | /** |
439 | | @def mysql_file_create_with_symlink(K, P1, P2, P3, P4, P5) |
440 | | Instrumented create with symbolic link. |
441 | | @c mysql_file_create_with_symlink is a replacement |
442 | | for @c my_create_with_symlink. |
443 | | */ |
444 | | #ifdef HAVE_PSI_FILE_INTERFACE |
445 | | #define mysql_file_create_with_symlink(K, P1, P2, P3, P4, P5) \ |
446 | | inline_mysql_file_create_with_symlink(K, __FILE__, __LINE__, \ |
447 | | P1, P2, P3, P4, P5) |
448 | | #else |
449 | | #define mysql_file_create_with_symlink(K, P1, P2, P3, P4, P5) \ |
450 | | inline_mysql_file_create_with_symlink(P1, P2, P3, P4, P5) |
451 | | #endif |
452 | | |
453 | | /** |
454 | | @def mysql_file_delete_with_symlink(K, P1, P2, P3) |
455 | | Instrumented delete with symbolic link. |
456 | | @c mysql_file_delete_with_symlink is a replacement |
457 | | for @c my_handler_delete_with_symlink. |
458 | | */ |
459 | | #ifdef HAVE_PSI_FILE_INTERFACE |
460 | | #define mysql_file_delete_with_symlink(K, P1, P2, P3) \ |
461 | | inline_mysql_file_delete_with_symlink(K, __FILE__, __LINE__, P1, P2, P3) |
462 | | #else |
463 | | #define mysql_file_delete_with_symlink(K, P1, P2, P3) \ |
464 | | inline_mysql_file_delete_with_symlink(P1, P2, P3) |
465 | | #endif |
466 | | |
467 | | /** |
468 | | @def mysql_file_rename_with_symlink(K, P1, P2, P3) |
469 | | Instrumented rename with symbolic link. |
470 | | @c mysql_file_rename_with_symlink is a replacement |
471 | | for @c my_rename_with_symlink. |
472 | | */ |
473 | | #ifdef HAVE_PSI_FILE_INTERFACE |
474 | | #define mysql_file_rename_with_symlink(K, P1, P2, P3) \ |
475 | | inline_mysql_file_rename_with_symlink(K, __FILE__, __LINE__, P1, P2, P3) |
476 | | #else |
477 | | #define mysql_file_rename_with_symlink(K, P1, P2, P3) \ |
478 | | inline_mysql_file_rename_with_symlink(P1, P2, P3) |
479 | | #endif |
480 | | |
481 | | /** |
482 | | @def mysql_file_sync(P1, P2) |
483 | | Instrumented file sync. |
484 | | @c mysql_file_sync is a replacement for @c my_sync. |
485 | | */ |
486 | | #ifdef HAVE_PSI_FILE_INTERFACE |
487 | | #define mysql_file_sync(P1, P2) \ |
488 | | inline_mysql_file_sync(__FILE__, __LINE__, P1, P2) |
489 | | #else |
490 | | #define mysql_file_sync(P1, P2) \ |
491 | | inline_mysql_file_sync(P1, P2) |
492 | | #endif |
493 | | |
494 | | /** |
495 | | An instrumented FILE structure. |
496 | | @sa MYSQL_FILE |
497 | | */ |
498 | | struct st_mysql_file |
499 | | { |
500 | | /** The real file. */ |
501 | | FILE *m_file; |
502 | | /** |
503 | | The instrumentation hook. |
504 | | Note that this hook is not conditionally defined, |
505 | | for binary compatibility of the @c MYSQL_FILE interface. |
506 | | */ |
507 | | struct PSI_file *m_psi; |
508 | | }; |
509 | | |
510 | | /** |
511 | | Type of an instrumented file. |
512 | | @c MYSQL_FILE is a drop-in replacement for @c FILE. |
513 | | @sa mysql_file_open |
514 | | */ |
515 | | typedef struct st_mysql_file MYSQL_FILE; |
516 | | |
517 | | static inline void inline_mysql_file_register( |
518 | | #ifdef HAVE_PSI_FILE_INTERFACE |
519 | | const char *category, |
520 | | PSI_file_info *info, |
521 | | int count |
522 | | #else |
523 | | const char *category __attribute__ ((unused)), |
524 | | void *info __attribute__ ((unused)), |
525 | | int count __attribute__ ((unused)) |
526 | | #endif |
527 | | ) |
528 | 0 | { |
529 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
530 | 0 | PSI_FILE_CALL(register_file)(category, info, count); |
531 | 0 | #endif |
532 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_register Unexecuted instantiation: my_static.c:inline_mysql_file_register Unexecuted instantiation: my_thr_init.c:inline_mysql_file_register Unexecuted instantiation: thr_mutex.c:inline_mysql_file_register Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_register Unexecuted instantiation: my_error.c:inline_mysql_file_register Unexecuted instantiation: my_getsystime.c:inline_mysql_file_register Unexecuted instantiation: my_init.c:inline_mysql_file_register Unexecuted instantiation: my_mess.c:inline_mysql_file_register Unexecuted instantiation: my_once.c:inline_mysql_file_register Unexecuted instantiation: my_symlink.c:inline_mysql_file_register Unexecuted instantiation: my_sync.c:inline_mysql_file_register Unexecuted instantiation: charset.c:inline_mysql_file_register Unexecuted instantiation: errors.c:inline_mysql_file_register Unexecuted instantiation: hash.c:inline_mysql_file_register Unexecuted instantiation: mf_dirname.c:inline_mysql_file_register Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_register Unexecuted instantiation: mf_pack.c:inline_mysql_file_register Unexecuted instantiation: my_div.c:inline_mysql_file_register Unexecuted instantiation: my_getwd.c:inline_mysql_file_register Unexecuted instantiation: my_lib.c:inline_mysql_file_register Unexecuted instantiation: my_open.c:inline_mysql_file_register Unexecuted instantiation: my_read.c:inline_mysql_file_register Unexecuted instantiation: array.c:inline_mysql_file_register Unexecuted instantiation: charset-def.c:inline_mysql_file_register Unexecuted instantiation: mf_qsort.c:inline_mysql_file_register |
533 | | |
534 | | static inline char * |
535 | | inline_mysql_file_fgets( |
536 | | #ifdef HAVE_PSI_FILE_INTERFACE |
537 | | const char *src_file, uint src_line, |
538 | | #endif |
539 | | char *str, int size, MYSQL_FILE *file) |
540 | 0 | { |
541 | 0 | char *result; |
542 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
543 | 0 | if (psi_likely(file->m_psi)) |
544 | 0 | { |
545 | 0 | struct PSI_file_locker *locker; |
546 | 0 | PSI_file_locker_state state; |
547 | 0 | locker= PSI_FILE_CALL(get_thread_file_stream_locker) (&state, file->m_psi, PSI_FILE_READ); |
548 | 0 | if (likely(locker != NULL)) |
549 | 0 | { |
550 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) size, src_file, src_line); |
551 | 0 | result= fgets(str, size, file->m_file); |
552 | 0 | PSI_FILE_CALL(end_file_wait)(locker, result ? strlen(result) : 0); |
553 | 0 | return result; |
554 | 0 | } |
555 | 0 | } |
556 | 0 | #endif |
557 | 0 |
|
558 | 0 | result= fgets(str, size, file->m_file); |
559 | 0 | return result; |
560 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_fgets Unexecuted instantiation: my_static.c:inline_mysql_file_fgets Unexecuted instantiation: my_thr_init.c:inline_mysql_file_fgets Unexecuted instantiation: thr_mutex.c:inline_mysql_file_fgets Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_fgets Unexecuted instantiation: my_error.c:inline_mysql_file_fgets Unexecuted instantiation: my_getsystime.c:inline_mysql_file_fgets Unexecuted instantiation: my_init.c:inline_mysql_file_fgets Unexecuted instantiation: my_mess.c:inline_mysql_file_fgets Unexecuted instantiation: my_once.c:inline_mysql_file_fgets Unexecuted instantiation: my_symlink.c:inline_mysql_file_fgets Unexecuted instantiation: my_sync.c:inline_mysql_file_fgets Unexecuted instantiation: charset.c:inline_mysql_file_fgets Unexecuted instantiation: errors.c:inline_mysql_file_fgets Unexecuted instantiation: hash.c:inline_mysql_file_fgets Unexecuted instantiation: mf_dirname.c:inline_mysql_file_fgets Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_fgets Unexecuted instantiation: mf_pack.c:inline_mysql_file_fgets Unexecuted instantiation: my_div.c:inline_mysql_file_fgets Unexecuted instantiation: my_getwd.c:inline_mysql_file_fgets Unexecuted instantiation: my_lib.c:inline_mysql_file_fgets Unexecuted instantiation: my_open.c:inline_mysql_file_fgets Unexecuted instantiation: my_read.c:inline_mysql_file_fgets Unexecuted instantiation: array.c:inline_mysql_file_fgets Unexecuted instantiation: charset-def.c:inline_mysql_file_fgets Unexecuted instantiation: mf_qsort.c:inline_mysql_file_fgets |
561 | | |
562 | | static inline int |
563 | | inline_mysql_file_fgetc( |
564 | | #ifdef HAVE_PSI_FILE_INTERFACE |
565 | | const char *src_file, uint src_line, |
566 | | #endif |
567 | | MYSQL_FILE *file) |
568 | 0 | { |
569 | 0 | int result; |
570 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
571 | 0 | if (psi_likely(file->m_psi)) |
572 | 0 | { |
573 | 0 | struct PSI_file_locker *locker; |
574 | 0 | PSI_file_locker_state state; |
575 | 0 | locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_READ); |
576 | 0 | if (likely(locker != NULL)) |
577 | 0 | { |
578 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 1, src_file, src_line); |
579 | 0 | result= fgetc(file->m_file); |
580 | 0 | PSI_FILE_CALL(end_file_wait)(locker, (size_t) 1); |
581 | 0 | return result; |
582 | 0 | } |
583 | 0 | } |
584 | 0 | #endif |
585 | 0 |
|
586 | 0 | result= fgetc(file->m_file); |
587 | 0 | return result; |
588 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_fgetc Unexecuted instantiation: my_static.c:inline_mysql_file_fgetc Unexecuted instantiation: my_thr_init.c:inline_mysql_file_fgetc Unexecuted instantiation: thr_mutex.c:inline_mysql_file_fgetc Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_fgetc Unexecuted instantiation: my_error.c:inline_mysql_file_fgetc Unexecuted instantiation: my_getsystime.c:inline_mysql_file_fgetc Unexecuted instantiation: my_init.c:inline_mysql_file_fgetc Unexecuted instantiation: my_mess.c:inline_mysql_file_fgetc Unexecuted instantiation: my_once.c:inline_mysql_file_fgetc Unexecuted instantiation: my_symlink.c:inline_mysql_file_fgetc Unexecuted instantiation: my_sync.c:inline_mysql_file_fgetc Unexecuted instantiation: charset.c:inline_mysql_file_fgetc Unexecuted instantiation: errors.c:inline_mysql_file_fgetc Unexecuted instantiation: hash.c:inline_mysql_file_fgetc Unexecuted instantiation: mf_dirname.c:inline_mysql_file_fgetc Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_fgetc Unexecuted instantiation: mf_pack.c:inline_mysql_file_fgetc Unexecuted instantiation: my_div.c:inline_mysql_file_fgetc Unexecuted instantiation: my_getwd.c:inline_mysql_file_fgetc Unexecuted instantiation: my_lib.c:inline_mysql_file_fgetc Unexecuted instantiation: my_open.c:inline_mysql_file_fgetc Unexecuted instantiation: my_read.c:inline_mysql_file_fgetc Unexecuted instantiation: array.c:inline_mysql_file_fgetc Unexecuted instantiation: charset-def.c:inline_mysql_file_fgetc Unexecuted instantiation: mf_qsort.c:inline_mysql_file_fgetc |
589 | | |
590 | | static inline int |
591 | | inline_mysql_file_fputs( |
592 | | #ifdef HAVE_PSI_FILE_INTERFACE |
593 | | const char *src_file, uint src_line, |
594 | | #endif |
595 | | const char *str, MYSQL_FILE *file) |
596 | 0 | { |
597 | 0 | int result; |
598 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
599 | 0 | if (psi_likely(file->m_psi)) |
600 | 0 | { |
601 | 0 | struct PSI_file_locker *locker; |
602 | 0 | PSI_file_locker_state state; |
603 | 0 | size_t bytes; |
604 | 0 | locker= PSI_FILE_CALL(get_thread_file_stream_locker) (&state, file->m_psi, PSI_FILE_WRITE); |
605 | 0 | if (likely(locker != NULL)) |
606 | 0 | { |
607 | 0 | bytes= str ? strlen(str) : 0; |
608 | 0 | PSI_FILE_CALL(start_file_wait)(locker, bytes, src_file, src_line); |
609 | 0 | result= fputs(str, file->m_file); |
610 | 0 | PSI_FILE_CALL(end_file_wait)(locker, bytes); |
611 | 0 | return result; |
612 | 0 | } |
613 | 0 | } |
614 | 0 | #endif |
615 | 0 |
|
616 | 0 | result= fputs(str, file->m_file); |
617 | 0 | return result; |
618 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_fputs Unexecuted instantiation: my_static.c:inline_mysql_file_fputs Unexecuted instantiation: my_thr_init.c:inline_mysql_file_fputs Unexecuted instantiation: thr_mutex.c:inline_mysql_file_fputs Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_fputs Unexecuted instantiation: my_error.c:inline_mysql_file_fputs Unexecuted instantiation: my_getsystime.c:inline_mysql_file_fputs Unexecuted instantiation: my_init.c:inline_mysql_file_fputs Unexecuted instantiation: my_mess.c:inline_mysql_file_fputs Unexecuted instantiation: my_once.c:inline_mysql_file_fputs Unexecuted instantiation: my_symlink.c:inline_mysql_file_fputs Unexecuted instantiation: my_sync.c:inline_mysql_file_fputs Unexecuted instantiation: charset.c:inline_mysql_file_fputs Unexecuted instantiation: errors.c:inline_mysql_file_fputs Unexecuted instantiation: hash.c:inline_mysql_file_fputs Unexecuted instantiation: mf_dirname.c:inline_mysql_file_fputs Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_fputs Unexecuted instantiation: mf_pack.c:inline_mysql_file_fputs Unexecuted instantiation: my_div.c:inline_mysql_file_fputs Unexecuted instantiation: my_getwd.c:inline_mysql_file_fputs Unexecuted instantiation: my_lib.c:inline_mysql_file_fputs Unexecuted instantiation: my_open.c:inline_mysql_file_fputs Unexecuted instantiation: my_read.c:inline_mysql_file_fputs Unexecuted instantiation: array.c:inline_mysql_file_fputs Unexecuted instantiation: charset-def.c:inline_mysql_file_fputs Unexecuted instantiation: mf_qsort.c:inline_mysql_file_fputs |
619 | | |
620 | | static inline int |
621 | | inline_mysql_file_fputc( |
622 | | #ifdef HAVE_PSI_FILE_INTERFACE |
623 | | const char *src_file, uint src_line, |
624 | | #endif |
625 | | char c, MYSQL_FILE *file) |
626 | 0 | { |
627 | 0 | int result; |
628 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
629 | 0 | if (psi_likely(file->m_psi)) |
630 | 0 | { |
631 | 0 | struct PSI_file_locker *locker; |
632 | 0 | PSI_file_locker_state state; |
633 | 0 | locker= PSI_FILE_CALL(get_thread_file_stream_locker) (&state, file->m_psi, PSI_FILE_WRITE); |
634 | 0 | if (likely(locker != NULL)) |
635 | 0 | { |
636 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 1, src_file, src_line); |
637 | 0 | result= fputc(c, file->m_file); |
638 | 0 | PSI_FILE_CALL(end_file_wait)(locker, (size_t) 1); |
639 | 0 | return result; |
640 | 0 | } |
641 | 0 | } |
642 | 0 | #endif |
643 | 0 |
|
644 | 0 | result= fputc(c, file->m_file); |
645 | 0 | return result; |
646 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_fputc Unexecuted instantiation: my_static.c:inline_mysql_file_fputc Unexecuted instantiation: my_thr_init.c:inline_mysql_file_fputc Unexecuted instantiation: thr_mutex.c:inline_mysql_file_fputc Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_fputc Unexecuted instantiation: my_error.c:inline_mysql_file_fputc Unexecuted instantiation: my_getsystime.c:inline_mysql_file_fputc Unexecuted instantiation: my_init.c:inline_mysql_file_fputc Unexecuted instantiation: my_mess.c:inline_mysql_file_fputc Unexecuted instantiation: my_once.c:inline_mysql_file_fputc Unexecuted instantiation: my_symlink.c:inline_mysql_file_fputc Unexecuted instantiation: my_sync.c:inline_mysql_file_fputc Unexecuted instantiation: charset.c:inline_mysql_file_fputc Unexecuted instantiation: errors.c:inline_mysql_file_fputc Unexecuted instantiation: hash.c:inline_mysql_file_fputc Unexecuted instantiation: mf_dirname.c:inline_mysql_file_fputc Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_fputc Unexecuted instantiation: mf_pack.c:inline_mysql_file_fputc Unexecuted instantiation: my_div.c:inline_mysql_file_fputc Unexecuted instantiation: my_getwd.c:inline_mysql_file_fputc Unexecuted instantiation: my_lib.c:inline_mysql_file_fputc Unexecuted instantiation: my_open.c:inline_mysql_file_fputc Unexecuted instantiation: my_read.c:inline_mysql_file_fputc Unexecuted instantiation: array.c:inline_mysql_file_fputc Unexecuted instantiation: charset-def.c:inline_mysql_file_fputc Unexecuted instantiation: mf_qsort.c:inline_mysql_file_fputc |
647 | | |
648 | | static inline int |
649 | | inline_mysql_file_fprintf(MYSQL_FILE *file, const char *format, ...) |
650 | 0 | { |
651 | 0 | /* |
652 | 0 | TODO: figure out how to pass src_file and src_line from the caller. |
653 | 0 | */ |
654 | 0 | int result; |
655 | 0 | va_list args; |
656 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
657 | 0 | if (psi_likely(file->m_psi)) |
658 | 0 | { |
659 | 0 | struct PSI_file_locker *locker; |
660 | 0 | PSI_file_locker_state state; |
661 | 0 | locker= PSI_FILE_CALL(get_thread_file_stream_locker) (&state, file->m_psi, PSI_FILE_WRITE); |
662 | 0 | if (likely(locker != NULL)) |
663 | 0 | { |
664 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, __FILE__, __LINE__); |
665 | 0 | va_start(args, format); |
666 | 0 | result= vfprintf(file->m_file, format, args); |
667 | 0 | va_end(args); |
668 | 0 | PSI_FILE_CALL(end_file_wait)(locker, (size_t) result); |
669 | 0 | return result; |
670 | 0 | } |
671 | 0 | } |
672 | 0 | #endif |
673 | 0 |
|
674 | 0 | va_start(args, format); |
675 | 0 | result= vfprintf(file->m_file, format, args); |
676 | 0 | va_end(args); |
677 | 0 | return result; |
678 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_fprintf Unexecuted instantiation: my_static.c:inline_mysql_file_fprintf Unexecuted instantiation: my_thr_init.c:inline_mysql_file_fprintf Unexecuted instantiation: thr_mutex.c:inline_mysql_file_fprintf Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_fprintf Unexecuted instantiation: my_error.c:inline_mysql_file_fprintf Unexecuted instantiation: my_getsystime.c:inline_mysql_file_fprintf Unexecuted instantiation: my_init.c:inline_mysql_file_fprintf Unexecuted instantiation: my_mess.c:inline_mysql_file_fprintf Unexecuted instantiation: my_once.c:inline_mysql_file_fprintf Unexecuted instantiation: my_symlink.c:inline_mysql_file_fprintf Unexecuted instantiation: my_sync.c:inline_mysql_file_fprintf Unexecuted instantiation: charset.c:inline_mysql_file_fprintf Unexecuted instantiation: errors.c:inline_mysql_file_fprintf Unexecuted instantiation: hash.c:inline_mysql_file_fprintf Unexecuted instantiation: mf_dirname.c:inline_mysql_file_fprintf Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_fprintf Unexecuted instantiation: mf_pack.c:inline_mysql_file_fprintf Unexecuted instantiation: my_div.c:inline_mysql_file_fprintf Unexecuted instantiation: my_getwd.c:inline_mysql_file_fprintf Unexecuted instantiation: my_lib.c:inline_mysql_file_fprintf Unexecuted instantiation: my_open.c:inline_mysql_file_fprintf Unexecuted instantiation: my_read.c:inline_mysql_file_fprintf Unexecuted instantiation: array.c:inline_mysql_file_fprintf Unexecuted instantiation: charset-def.c:inline_mysql_file_fprintf Unexecuted instantiation: mf_qsort.c:inline_mysql_file_fprintf |
679 | | |
680 | | static inline int |
681 | | inline_mysql_file_vfprintf( |
682 | | #ifdef HAVE_PSI_FILE_INTERFACE |
683 | | const char *src_file, uint src_line, |
684 | | #endif |
685 | | MYSQL_FILE *file, const char *format, va_list args) |
686 | 0 | { |
687 | 0 | int result; |
688 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
689 | 0 | if (psi_likely(file->m_psi)) |
690 | 0 | { |
691 | 0 | struct PSI_file_locker *locker; |
692 | 0 | PSI_file_locker_state state; |
693 | 0 | locker= PSI_FILE_CALL(get_thread_file_stream_locker) (&state, file->m_psi, PSI_FILE_WRITE); |
694 | 0 | if (likely(locker != NULL)) |
695 | 0 | { |
696 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); |
697 | 0 | result= vfprintf(file->m_file, format, args); |
698 | 0 | PSI_FILE_CALL(end_file_wait)(locker, (size_t) result); |
699 | 0 | return result; |
700 | 0 | } |
701 | 0 | } |
702 | 0 | #endif |
703 | 0 |
|
704 | 0 | result= vfprintf(file->m_file, format, args); |
705 | 0 | return result; |
706 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_static.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_thr_init.c:inline_mysql_file_vfprintf Unexecuted instantiation: thr_mutex.c:inline_mysql_file_vfprintf Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_error.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_getsystime.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_init.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_mess.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_once.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_symlink.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_sync.c:inline_mysql_file_vfprintf Unexecuted instantiation: charset.c:inline_mysql_file_vfprintf Unexecuted instantiation: errors.c:inline_mysql_file_vfprintf Unexecuted instantiation: hash.c:inline_mysql_file_vfprintf Unexecuted instantiation: mf_dirname.c:inline_mysql_file_vfprintf Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_vfprintf Unexecuted instantiation: mf_pack.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_div.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_getwd.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_lib.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_open.c:inline_mysql_file_vfprintf Unexecuted instantiation: my_read.c:inline_mysql_file_vfprintf Unexecuted instantiation: array.c:inline_mysql_file_vfprintf Unexecuted instantiation: charset-def.c:inline_mysql_file_vfprintf Unexecuted instantiation: mf_qsort.c:inline_mysql_file_vfprintf |
707 | | |
708 | | static inline int |
709 | | inline_mysql_file_fflush( |
710 | | #ifdef HAVE_PSI_FILE_INTERFACE |
711 | | const char *src_file, uint src_line, |
712 | | #endif |
713 | | MYSQL_FILE *file) |
714 | 0 | { |
715 | 0 | int result; |
716 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
717 | 0 | if (psi_likely(file->m_psi)) |
718 | 0 | { |
719 | 0 | struct PSI_file_locker *locker; |
720 | 0 | PSI_file_locker_state state; |
721 | 0 | locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_FLUSH); |
722 | 0 | if (likely(locker != NULL)) |
723 | 0 | { |
724 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); |
725 | 0 | result= fflush(file->m_file); |
726 | 0 | PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); |
727 | 0 | return result; |
728 | 0 | } |
729 | 0 | } |
730 | 0 | #endif |
731 | 0 |
|
732 | 0 | result= fflush(file->m_file); |
733 | 0 | return result; |
734 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_fflush Unexecuted instantiation: my_static.c:inline_mysql_file_fflush Unexecuted instantiation: my_thr_init.c:inline_mysql_file_fflush Unexecuted instantiation: thr_mutex.c:inline_mysql_file_fflush Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_fflush Unexecuted instantiation: my_error.c:inline_mysql_file_fflush Unexecuted instantiation: my_getsystime.c:inline_mysql_file_fflush Unexecuted instantiation: my_init.c:inline_mysql_file_fflush Unexecuted instantiation: my_mess.c:inline_mysql_file_fflush Unexecuted instantiation: my_once.c:inline_mysql_file_fflush Unexecuted instantiation: my_symlink.c:inline_mysql_file_fflush Unexecuted instantiation: my_sync.c:inline_mysql_file_fflush Unexecuted instantiation: charset.c:inline_mysql_file_fflush Unexecuted instantiation: errors.c:inline_mysql_file_fflush Unexecuted instantiation: hash.c:inline_mysql_file_fflush Unexecuted instantiation: mf_dirname.c:inline_mysql_file_fflush Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_fflush Unexecuted instantiation: mf_pack.c:inline_mysql_file_fflush Unexecuted instantiation: my_div.c:inline_mysql_file_fflush Unexecuted instantiation: my_getwd.c:inline_mysql_file_fflush Unexecuted instantiation: my_lib.c:inline_mysql_file_fflush Unexecuted instantiation: my_open.c:inline_mysql_file_fflush Unexecuted instantiation: my_read.c:inline_mysql_file_fflush Unexecuted instantiation: array.c:inline_mysql_file_fflush Unexecuted instantiation: charset-def.c:inline_mysql_file_fflush Unexecuted instantiation: mf_qsort.c:inline_mysql_file_fflush |
735 | | |
736 | | static inline int inline_mysql_file_feof(MYSQL_FILE *file) |
737 | 0 | { |
738 | 0 | /* Not instrumented, there is no wait involved */ |
739 | 0 | return feof(file->m_file); |
740 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_feof Unexecuted instantiation: my_static.c:inline_mysql_file_feof Unexecuted instantiation: my_thr_init.c:inline_mysql_file_feof Unexecuted instantiation: thr_mutex.c:inline_mysql_file_feof Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_feof Unexecuted instantiation: my_error.c:inline_mysql_file_feof Unexecuted instantiation: my_getsystime.c:inline_mysql_file_feof Unexecuted instantiation: my_init.c:inline_mysql_file_feof Unexecuted instantiation: my_mess.c:inline_mysql_file_feof Unexecuted instantiation: my_once.c:inline_mysql_file_feof Unexecuted instantiation: my_symlink.c:inline_mysql_file_feof Unexecuted instantiation: my_sync.c:inline_mysql_file_feof Unexecuted instantiation: charset.c:inline_mysql_file_feof Unexecuted instantiation: errors.c:inline_mysql_file_feof Unexecuted instantiation: hash.c:inline_mysql_file_feof Unexecuted instantiation: mf_dirname.c:inline_mysql_file_feof Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_feof Unexecuted instantiation: mf_pack.c:inline_mysql_file_feof Unexecuted instantiation: my_div.c:inline_mysql_file_feof Unexecuted instantiation: my_getwd.c:inline_mysql_file_feof Unexecuted instantiation: my_lib.c:inline_mysql_file_feof Unexecuted instantiation: my_open.c:inline_mysql_file_feof Unexecuted instantiation: my_read.c:inline_mysql_file_feof Unexecuted instantiation: array.c:inline_mysql_file_feof Unexecuted instantiation: charset-def.c:inline_mysql_file_feof Unexecuted instantiation: mf_qsort.c:inline_mysql_file_feof |
741 | | |
742 | | static inline int |
743 | | inline_mysql_file_fstat( |
744 | | #ifdef HAVE_PSI_FILE_INTERFACE |
745 | | const char *src_file, uint src_line, |
746 | | #endif |
747 | | int filenr, MY_STAT *stat_area, myf flags) |
748 | 0 | { |
749 | 0 | int result; |
750 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
751 | 0 | struct PSI_file_locker *locker; |
752 | 0 | PSI_file_locker_state state; |
753 | 0 | locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, filenr, PSI_FILE_FSTAT); |
754 | 0 | if (psi_likely(locker != NULL)) |
755 | 0 | { |
756 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); |
757 | 0 | result= my_fstat(filenr, stat_area, flags); |
758 | 0 | PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); |
759 | 0 | return result; |
760 | 0 | } |
761 | 0 | #endif |
762 | 0 |
|
763 | 0 | result= my_fstat(filenr, stat_area, flags); |
764 | 0 | return result; |
765 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_fstat Unexecuted instantiation: my_static.c:inline_mysql_file_fstat Unexecuted instantiation: my_thr_init.c:inline_mysql_file_fstat Unexecuted instantiation: thr_mutex.c:inline_mysql_file_fstat Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_fstat Unexecuted instantiation: my_error.c:inline_mysql_file_fstat Unexecuted instantiation: my_getsystime.c:inline_mysql_file_fstat Unexecuted instantiation: my_init.c:inline_mysql_file_fstat Unexecuted instantiation: my_mess.c:inline_mysql_file_fstat Unexecuted instantiation: my_once.c:inline_mysql_file_fstat Unexecuted instantiation: my_symlink.c:inline_mysql_file_fstat Unexecuted instantiation: my_sync.c:inline_mysql_file_fstat Unexecuted instantiation: charset.c:inline_mysql_file_fstat Unexecuted instantiation: errors.c:inline_mysql_file_fstat Unexecuted instantiation: hash.c:inline_mysql_file_fstat Unexecuted instantiation: mf_dirname.c:inline_mysql_file_fstat Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_fstat Unexecuted instantiation: mf_pack.c:inline_mysql_file_fstat Unexecuted instantiation: my_div.c:inline_mysql_file_fstat Unexecuted instantiation: my_getwd.c:inline_mysql_file_fstat Unexecuted instantiation: my_lib.c:inline_mysql_file_fstat Unexecuted instantiation: my_open.c:inline_mysql_file_fstat Unexecuted instantiation: my_read.c:inline_mysql_file_fstat Unexecuted instantiation: array.c:inline_mysql_file_fstat Unexecuted instantiation: charset-def.c:inline_mysql_file_fstat Unexecuted instantiation: mf_qsort.c:inline_mysql_file_fstat |
766 | | |
767 | | static inline MY_STAT * |
768 | | inline_mysql_file_stat( |
769 | | #ifdef HAVE_PSI_FILE_INTERFACE |
770 | | PSI_file_key key, const char *src_file, uint src_line, |
771 | | #endif |
772 | | const char *path, MY_STAT *stat_area, myf flags) |
773 | 0 | { |
774 | 0 | MY_STAT *result; |
775 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
776 | 0 | struct PSI_file_locker *locker; |
777 | 0 | PSI_file_locker_state state; |
778 | 0 | locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STAT, path, &locker); |
779 | 0 | if (psi_likely(locker != NULL)) |
780 | 0 | { |
781 | 0 | PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); |
782 | 0 | result= my_stat(path, stat_area, flags); |
783 | 0 | PSI_FILE_CALL(end_file_open_wait)(locker, result); |
784 | 0 | return result; |
785 | 0 | } |
786 | 0 | #endif |
787 | 0 |
|
788 | 0 | result= my_stat(path, stat_area, flags); |
789 | 0 | return result; |
790 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_stat Unexecuted instantiation: my_static.c:inline_mysql_file_stat Unexecuted instantiation: my_thr_init.c:inline_mysql_file_stat Unexecuted instantiation: thr_mutex.c:inline_mysql_file_stat Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_stat Unexecuted instantiation: my_error.c:inline_mysql_file_stat Unexecuted instantiation: my_getsystime.c:inline_mysql_file_stat Unexecuted instantiation: my_init.c:inline_mysql_file_stat Unexecuted instantiation: my_mess.c:inline_mysql_file_stat Unexecuted instantiation: my_once.c:inline_mysql_file_stat Unexecuted instantiation: my_symlink.c:inline_mysql_file_stat Unexecuted instantiation: my_sync.c:inline_mysql_file_stat Unexecuted instantiation: charset.c:inline_mysql_file_stat Unexecuted instantiation: errors.c:inline_mysql_file_stat Unexecuted instantiation: hash.c:inline_mysql_file_stat Unexecuted instantiation: mf_dirname.c:inline_mysql_file_stat Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_stat Unexecuted instantiation: mf_pack.c:inline_mysql_file_stat Unexecuted instantiation: my_div.c:inline_mysql_file_stat Unexecuted instantiation: my_getwd.c:inline_mysql_file_stat Unexecuted instantiation: my_lib.c:inline_mysql_file_stat Unexecuted instantiation: my_open.c:inline_mysql_file_stat Unexecuted instantiation: my_read.c:inline_mysql_file_stat Unexecuted instantiation: array.c:inline_mysql_file_stat Unexecuted instantiation: charset-def.c:inline_mysql_file_stat Unexecuted instantiation: mf_qsort.c:inline_mysql_file_stat |
791 | | |
792 | | static inline int |
793 | | inline_mysql_file_chsize( |
794 | | #ifdef HAVE_PSI_FILE_INTERFACE |
795 | | const char *src_file, uint src_line, |
796 | | #endif |
797 | | File file, my_off_t newlength, int filler, myf flags) |
798 | 0 | { |
799 | 0 | int result; |
800 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
801 | 0 | struct PSI_file_locker *locker; |
802 | 0 | PSI_file_locker_state state; |
803 | 0 | locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CHSIZE); |
804 | 0 | if (psi_likely(locker != NULL)) |
805 | 0 | { |
806 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) newlength, src_file, |
807 | 0 | src_line); |
808 | 0 | result= my_chsize(file, newlength, filler, flags); |
809 | 0 | PSI_FILE_CALL(end_file_wait)(locker, (size_t) newlength); |
810 | 0 | return result; |
811 | 0 | } |
812 | 0 | #endif |
813 | 0 |
|
814 | 0 | result= my_chsize(file, newlength, filler, flags); |
815 | 0 | return result; |
816 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_chsize Unexecuted instantiation: my_static.c:inline_mysql_file_chsize Unexecuted instantiation: my_thr_init.c:inline_mysql_file_chsize Unexecuted instantiation: thr_mutex.c:inline_mysql_file_chsize Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_chsize Unexecuted instantiation: my_error.c:inline_mysql_file_chsize Unexecuted instantiation: my_getsystime.c:inline_mysql_file_chsize Unexecuted instantiation: my_init.c:inline_mysql_file_chsize Unexecuted instantiation: my_mess.c:inline_mysql_file_chsize Unexecuted instantiation: my_once.c:inline_mysql_file_chsize Unexecuted instantiation: my_symlink.c:inline_mysql_file_chsize Unexecuted instantiation: my_sync.c:inline_mysql_file_chsize Unexecuted instantiation: charset.c:inline_mysql_file_chsize Unexecuted instantiation: errors.c:inline_mysql_file_chsize Unexecuted instantiation: hash.c:inline_mysql_file_chsize Unexecuted instantiation: mf_dirname.c:inline_mysql_file_chsize Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_chsize Unexecuted instantiation: mf_pack.c:inline_mysql_file_chsize Unexecuted instantiation: my_div.c:inline_mysql_file_chsize Unexecuted instantiation: my_getwd.c:inline_mysql_file_chsize Unexecuted instantiation: my_lib.c:inline_mysql_file_chsize Unexecuted instantiation: my_open.c:inline_mysql_file_chsize Unexecuted instantiation: my_read.c:inline_mysql_file_chsize Unexecuted instantiation: array.c:inline_mysql_file_chsize Unexecuted instantiation: charset-def.c:inline_mysql_file_chsize Unexecuted instantiation: mf_qsort.c:inline_mysql_file_chsize |
817 | | |
818 | | static inline MYSQL_FILE* |
819 | | inline_mysql_file_fopen( |
820 | | #ifdef HAVE_PSI_FILE_INTERFACE |
821 | | PSI_file_key key, const char *src_file, uint src_line, |
822 | | #endif |
823 | | const char *filename, int flags, myf myFlags) |
824 | 0 | { |
825 | 0 | MYSQL_FILE *that; |
826 | 0 | that= (MYSQL_FILE*) my_malloc(PSI_NOT_INSTRUMENTED, |
827 | 0 | sizeof(MYSQL_FILE), MYF(MY_WME)); |
828 | 0 | if (likely(that != NULL)) |
829 | 0 | { |
830 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
831 | 0 | struct PSI_file_locker *locker; |
832 | 0 | PSI_file_locker_state state; |
833 | 0 | locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STREAM_OPEN, |
834 | 0 | filename, that); |
835 | 0 | if (psi_likely(locker != NULL)) |
836 | 0 | { |
837 | 0 | PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); |
838 | 0 | that->m_file= my_fopen(filename, flags, myFlags); |
839 | 0 | that->m_psi= PSI_FILE_CALL(end_file_open_wait)(locker, that->m_file); |
840 | 0 | if (unlikely(that->m_file == NULL)) |
841 | 0 | { |
842 | 0 | my_free(that); |
843 | 0 | return NULL; |
844 | 0 | } |
845 | 0 | return that; |
846 | 0 | } |
847 | 0 | #endif |
848 | 0 |
|
849 | 0 | that->m_psi= NULL; |
850 | 0 | that->m_file= my_fopen(filename, flags, myFlags); |
851 | 0 | if (unlikely(that->m_file == NULL)) |
852 | 0 | { |
853 | 0 | my_free(that); |
854 | 0 | return NULL; |
855 | 0 | } |
856 | 0 | } |
857 | 0 | return that; |
858 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_fopen Unexecuted instantiation: my_static.c:inline_mysql_file_fopen Unexecuted instantiation: my_thr_init.c:inline_mysql_file_fopen Unexecuted instantiation: thr_mutex.c:inline_mysql_file_fopen Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_fopen Unexecuted instantiation: my_error.c:inline_mysql_file_fopen Unexecuted instantiation: my_getsystime.c:inline_mysql_file_fopen Unexecuted instantiation: my_init.c:inline_mysql_file_fopen Unexecuted instantiation: my_mess.c:inline_mysql_file_fopen Unexecuted instantiation: my_once.c:inline_mysql_file_fopen Unexecuted instantiation: my_symlink.c:inline_mysql_file_fopen Unexecuted instantiation: my_sync.c:inline_mysql_file_fopen Unexecuted instantiation: charset.c:inline_mysql_file_fopen Unexecuted instantiation: errors.c:inline_mysql_file_fopen Unexecuted instantiation: hash.c:inline_mysql_file_fopen Unexecuted instantiation: mf_dirname.c:inline_mysql_file_fopen Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_fopen Unexecuted instantiation: mf_pack.c:inline_mysql_file_fopen Unexecuted instantiation: my_div.c:inline_mysql_file_fopen Unexecuted instantiation: my_getwd.c:inline_mysql_file_fopen Unexecuted instantiation: my_lib.c:inline_mysql_file_fopen Unexecuted instantiation: my_open.c:inline_mysql_file_fopen Unexecuted instantiation: my_read.c:inline_mysql_file_fopen Unexecuted instantiation: array.c:inline_mysql_file_fopen Unexecuted instantiation: charset-def.c:inline_mysql_file_fopen Unexecuted instantiation: mf_qsort.c:inline_mysql_file_fopen |
859 | | |
860 | | static inline int |
861 | | inline_mysql_file_fclose( |
862 | | #ifdef HAVE_PSI_FILE_INTERFACE |
863 | | const char *src_file, uint src_line, |
864 | | #endif |
865 | | MYSQL_FILE *file, myf flags) |
866 | 0 | { |
867 | 0 | int result= 0; |
868 | 0 | if (likely(file != NULL)) |
869 | 0 | { |
870 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
871 | 0 | if (psi_likely(file->m_psi)) |
872 | 0 | { |
873 | 0 | struct PSI_file_locker *locker; |
874 | 0 | PSI_file_locker_state state; |
875 | 0 | locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, |
876 | 0 | PSI_FILE_STREAM_CLOSE); |
877 | 0 | if (likely(locker != NULL)) |
878 | 0 | { |
879 | 0 | PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); |
880 | 0 | result= my_fclose(file->m_file, flags); |
881 | 0 | PSI_FILE_CALL(end_file_close_wait)(locker, result); |
882 | 0 | my_free(file); |
883 | 0 | return result; |
884 | 0 | } |
885 | 0 | } |
886 | 0 | #endif |
887 | 0 |
|
888 | 0 | result= my_fclose(file->m_file, flags); |
889 | 0 | my_free(file); |
890 | 0 | } |
891 | 0 | return result; |
892 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_fclose Unexecuted instantiation: my_static.c:inline_mysql_file_fclose Unexecuted instantiation: my_thr_init.c:inline_mysql_file_fclose Unexecuted instantiation: thr_mutex.c:inline_mysql_file_fclose Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_fclose Unexecuted instantiation: my_error.c:inline_mysql_file_fclose Unexecuted instantiation: my_getsystime.c:inline_mysql_file_fclose Unexecuted instantiation: my_init.c:inline_mysql_file_fclose Unexecuted instantiation: my_mess.c:inline_mysql_file_fclose Unexecuted instantiation: my_once.c:inline_mysql_file_fclose Unexecuted instantiation: my_symlink.c:inline_mysql_file_fclose Unexecuted instantiation: my_sync.c:inline_mysql_file_fclose Unexecuted instantiation: charset.c:inline_mysql_file_fclose Unexecuted instantiation: errors.c:inline_mysql_file_fclose Unexecuted instantiation: hash.c:inline_mysql_file_fclose Unexecuted instantiation: mf_dirname.c:inline_mysql_file_fclose Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_fclose Unexecuted instantiation: mf_pack.c:inline_mysql_file_fclose Unexecuted instantiation: my_div.c:inline_mysql_file_fclose Unexecuted instantiation: my_getwd.c:inline_mysql_file_fclose Unexecuted instantiation: my_lib.c:inline_mysql_file_fclose Unexecuted instantiation: my_open.c:inline_mysql_file_fclose Unexecuted instantiation: my_read.c:inline_mysql_file_fclose Unexecuted instantiation: array.c:inline_mysql_file_fclose Unexecuted instantiation: charset-def.c:inline_mysql_file_fclose Unexecuted instantiation: mf_qsort.c:inline_mysql_file_fclose |
893 | | |
894 | | static inline size_t |
895 | | inline_mysql_file_fread( |
896 | | #ifdef HAVE_PSI_FILE_INTERFACE |
897 | | const char *src_file, uint src_line, |
898 | | #endif |
899 | | MYSQL_FILE *file, uchar *buffer, size_t count, myf flags) |
900 | 0 | { |
901 | 0 | size_t result; |
902 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
903 | 0 | if (psi_likely(file->m_psi)) |
904 | 0 | { |
905 | 0 | struct PSI_file_locker *locker; |
906 | 0 | PSI_file_locker_state state; |
907 | 0 | size_t bytes_read; |
908 | 0 | locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_READ); |
909 | 0 | if (likely(locker != NULL)) |
910 | 0 | { |
911 | 0 | PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); |
912 | 0 | result= my_fread(file->m_file, buffer, count, flags); |
913 | 0 | if (flags & (MY_NABP | MY_FNABP)) |
914 | 0 | bytes_read= (result == 0) ? count : 0; |
915 | 0 | else |
916 | 0 | bytes_read= (result != MY_FILE_ERROR) ? result : 0; |
917 | 0 | PSI_FILE_CALL(end_file_wait)(locker, bytes_read); |
918 | 0 | return result; |
919 | 0 | } |
920 | 0 | } |
921 | 0 | #endif |
922 | 0 |
|
923 | 0 | result= my_fread(file->m_file, buffer, count, flags); |
924 | 0 | return result; |
925 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_fread Unexecuted instantiation: my_static.c:inline_mysql_file_fread Unexecuted instantiation: my_thr_init.c:inline_mysql_file_fread Unexecuted instantiation: thr_mutex.c:inline_mysql_file_fread Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_fread Unexecuted instantiation: my_error.c:inline_mysql_file_fread Unexecuted instantiation: my_getsystime.c:inline_mysql_file_fread Unexecuted instantiation: my_init.c:inline_mysql_file_fread Unexecuted instantiation: my_mess.c:inline_mysql_file_fread Unexecuted instantiation: my_once.c:inline_mysql_file_fread Unexecuted instantiation: my_symlink.c:inline_mysql_file_fread Unexecuted instantiation: my_sync.c:inline_mysql_file_fread Unexecuted instantiation: charset.c:inline_mysql_file_fread Unexecuted instantiation: errors.c:inline_mysql_file_fread Unexecuted instantiation: hash.c:inline_mysql_file_fread Unexecuted instantiation: mf_dirname.c:inline_mysql_file_fread Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_fread Unexecuted instantiation: mf_pack.c:inline_mysql_file_fread Unexecuted instantiation: my_div.c:inline_mysql_file_fread Unexecuted instantiation: my_getwd.c:inline_mysql_file_fread Unexecuted instantiation: my_lib.c:inline_mysql_file_fread Unexecuted instantiation: my_open.c:inline_mysql_file_fread Unexecuted instantiation: my_read.c:inline_mysql_file_fread Unexecuted instantiation: array.c:inline_mysql_file_fread Unexecuted instantiation: charset-def.c:inline_mysql_file_fread Unexecuted instantiation: mf_qsort.c:inline_mysql_file_fread |
926 | | |
927 | | static inline size_t |
928 | | inline_mysql_file_fwrite( |
929 | | #ifdef HAVE_PSI_FILE_INTERFACE |
930 | | const char *src_file, uint src_line, |
931 | | #endif |
932 | | MYSQL_FILE *file, const uchar *buffer, size_t count, myf flags) |
933 | 0 | { |
934 | 0 | size_t result; |
935 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
936 | 0 | if (psi_likely(file->m_psi)) |
937 | 0 | { |
938 | 0 | struct PSI_file_locker *locker; |
939 | 0 | PSI_file_locker_state state; |
940 | 0 | size_t bytes_written; |
941 | 0 | locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_WRITE); |
942 | 0 | if (likely(locker != NULL)) |
943 | 0 | { |
944 | 0 | PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); |
945 | 0 | result= my_fwrite(file->m_file, buffer, count, flags); |
946 | 0 | if (flags & (MY_NABP | MY_FNABP)) |
947 | 0 | bytes_written= (result == 0) ? count : 0; |
948 | 0 | else |
949 | 0 | bytes_written= (result != MY_FILE_ERROR) ? result : 0; |
950 | 0 | PSI_FILE_CALL(end_file_wait)(locker, bytes_written); |
951 | 0 | return result; |
952 | 0 | } |
953 | 0 | } |
954 | 0 | #endif |
955 | 0 |
|
956 | 0 | result= my_fwrite(file->m_file, buffer, count, flags); |
957 | 0 | return result; |
958 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_fwrite Unexecuted instantiation: my_static.c:inline_mysql_file_fwrite Unexecuted instantiation: my_thr_init.c:inline_mysql_file_fwrite Unexecuted instantiation: thr_mutex.c:inline_mysql_file_fwrite Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_fwrite Unexecuted instantiation: my_error.c:inline_mysql_file_fwrite Unexecuted instantiation: my_getsystime.c:inline_mysql_file_fwrite Unexecuted instantiation: my_init.c:inline_mysql_file_fwrite Unexecuted instantiation: my_mess.c:inline_mysql_file_fwrite Unexecuted instantiation: my_once.c:inline_mysql_file_fwrite Unexecuted instantiation: my_symlink.c:inline_mysql_file_fwrite Unexecuted instantiation: my_sync.c:inline_mysql_file_fwrite Unexecuted instantiation: charset.c:inline_mysql_file_fwrite Unexecuted instantiation: errors.c:inline_mysql_file_fwrite Unexecuted instantiation: hash.c:inline_mysql_file_fwrite Unexecuted instantiation: mf_dirname.c:inline_mysql_file_fwrite Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_fwrite Unexecuted instantiation: mf_pack.c:inline_mysql_file_fwrite Unexecuted instantiation: my_div.c:inline_mysql_file_fwrite Unexecuted instantiation: my_getwd.c:inline_mysql_file_fwrite Unexecuted instantiation: my_lib.c:inline_mysql_file_fwrite Unexecuted instantiation: my_open.c:inline_mysql_file_fwrite Unexecuted instantiation: my_read.c:inline_mysql_file_fwrite Unexecuted instantiation: array.c:inline_mysql_file_fwrite Unexecuted instantiation: charset-def.c:inline_mysql_file_fwrite Unexecuted instantiation: mf_qsort.c:inline_mysql_file_fwrite |
959 | | |
960 | | static inline my_off_t |
961 | | inline_mysql_file_fseek( |
962 | | #ifdef HAVE_PSI_FILE_INTERFACE |
963 | | const char *src_file, uint src_line, |
964 | | #endif |
965 | | MYSQL_FILE *file, my_off_t pos, int whence, myf flags) |
966 | 0 | { |
967 | 0 | my_off_t result; |
968 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
969 | 0 | if (psi_likely(file->m_psi)) |
970 | 0 | { |
971 | 0 | struct PSI_file_locker *locker; |
972 | 0 | PSI_file_locker_state state; |
973 | 0 | locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_SEEK); |
974 | 0 | if (likely(locker != NULL)) |
975 | 0 | { |
976 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); |
977 | 0 | result= my_fseek(file->m_file, pos, whence, flags); |
978 | 0 | PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); |
979 | 0 | return result; |
980 | 0 | } |
981 | 0 | } |
982 | 0 | #endif |
983 | 0 |
|
984 | 0 | result= my_fseek(file->m_file, pos, whence, flags); |
985 | 0 | return result; |
986 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_fseek Unexecuted instantiation: my_static.c:inline_mysql_file_fseek Unexecuted instantiation: my_thr_init.c:inline_mysql_file_fseek Unexecuted instantiation: thr_mutex.c:inline_mysql_file_fseek Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_fseek Unexecuted instantiation: my_error.c:inline_mysql_file_fseek Unexecuted instantiation: my_getsystime.c:inline_mysql_file_fseek Unexecuted instantiation: my_init.c:inline_mysql_file_fseek Unexecuted instantiation: my_mess.c:inline_mysql_file_fseek Unexecuted instantiation: my_once.c:inline_mysql_file_fseek Unexecuted instantiation: my_symlink.c:inline_mysql_file_fseek Unexecuted instantiation: my_sync.c:inline_mysql_file_fseek Unexecuted instantiation: charset.c:inline_mysql_file_fseek Unexecuted instantiation: errors.c:inline_mysql_file_fseek Unexecuted instantiation: hash.c:inline_mysql_file_fseek Unexecuted instantiation: mf_dirname.c:inline_mysql_file_fseek Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_fseek Unexecuted instantiation: mf_pack.c:inline_mysql_file_fseek Unexecuted instantiation: my_div.c:inline_mysql_file_fseek Unexecuted instantiation: my_getwd.c:inline_mysql_file_fseek Unexecuted instantiation: my_lib.c:inline_mysql_file_fseek Unexecuted instantiation: my_open.c:inline_mysql_file_fseek Unexecuted instantiation: my_read.c:inline_mysql_file_fseek Unexecuted instantiation: array.c:inline_mysql_file_fseek Unexecuted instantiation: charset-def.c:inline_mysql_file_fseek Unexecuted instantiation: mf_qsort.c:inline_mysql_file_fseek |
987 | | |
988 | | static inline my_off_t |
989 | | inline_mysql_file_ftell( |
990 | | #ifdef HAVE_PSI_FILE_INTERFACE |
991 | | const char *src_file, uint src_line, |
992 | | #endif |
993 | | MYSQL_FILE *file, myf flags) |
994 | 0 | { |
995 | 0 | my_off_t result; |
996 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
997 | 0 | if (psi_likely(file->m_psi)) |
998 | 0 | { |
999 | 0 | struct PSI_file_locker *locker; |
1000 | 0 | PSI_file_locker_state state; |
1001 | 0 | locker= PSI_FILE_CALL(get_thread_file_stream_locker)(&state, file->m_psi, PSI_FILE_TELL); |
1002 | 0 | if (likely(locker != NULL)) |
1003 | 0 | { |
1004 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); |
1005 | 0 | result= my_ftell(file->m_file, flags); |
1006 | 0 | PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); |
1007 | 0 | return result; |
1008 | 0 | } |
1009 | 0 | } |
1010 | 0 | #endif |
1011 | 0 |
|
1012 | 0 | result= my_ftell(file->m_file, flags); |
1013 | 0 | return result; |
1014 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_ftell Unexecuted instantiation: my_static.c:inline_mysql_file_ftell Unexecuted instantiation: my_thr_init.c:inline_mysql_file_ftell Unexecuted instantiation: thr_mutex.c:inline_mysql_file_ftell Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_ftell Unexecuted instantiation: my_error.c:inline_mysql_file_ftell Unexecuted instantiation: my_getsystime.c:inline_mysql_file_ftell Unexecuted instantiation: my_init.c:inline_mysql_file_ftell Unexecuted instantiation: my_mess.c:inline_mysql_file_ftell Unexecuted instantiation: my_once.c:inline_mysql_file_ftell Unexecuted instantiation: my_symlink.c:inline_mysql_file_ftell Unexecuted instantiation: my_sync.c:inline_mysql_file_ftell Unexecuted instantiation: charset.c:inline_mysql_file_ftell Unexecuted instantiation: errors.c:inline_mysql_file_ftell Unexecuted instantiation: hash.c:inline_mysql_file_ftell Unexecuted instantiation: mf_dirname.c:inline_mysql_file_ftell Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_ftell Unexecuted instantiation: mf_pack.c:inline_mysql_file_ftell Unexecuted instantiation: my_div.c:inline_mysql_file_ftell Unexecuted instantiation: my_getwd.c:inline_mysql_file_ftell Unexecuted instantiation: my_lib.c:inline_mysql_file_ftell Unexecuted instantiation: my_open.c:inline_mysql_file_ftell Unexecuted instantiation: my_read.c:inline_mysql_file_ftell Unexecuted instantiation: array.c:inline_mysql_file_ftell Unexecuted instantiation: charset-def.c:inline_mysql_file_ftell Unexecuted instantiation: mf_qsort.c:inline_mysql_file_ftell |
1015 | | |
1016 | | static inline File |
1017 | | inline_mysql_file_create( |
1018 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1019 | | PSI_file_key key, const char *src_file, uint src_line, |
1020 | | #endif |
1021 | | const char *filename, int create_flags, int access_flags, myf myFlags) |
1022 | 0 | { |
1023 | 0 | File file; |
1024 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1025 | 0 | struct PSI_file_locker *locker; |
1026 | 0 | PSI_file_locker_state state; |
1027 | 0 | locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename, |
1028 | 0 | &locker); |
1029 | 0 | if (psi_likely(locker != NULL)) |
1030 | 0 | { |
1031 | 0 | PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); |
1032 | 0 | file= my_create(filename, create_flags, access_flags, myFlags); |
1033 | 0 | PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); |
1034 | 0 | return file; |
1035 | 0 | } |
1036 | 0 | #endif |
1037 | 0 |
|
1038 | 0 | file= my_create(filename, create_flags, access_flags, myFlags); |
1039 | 0 | return file; |
1040 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_create Unexecuted instantiation: my_static.c:inline_mysql_file_create Unexecuted instantiation: my_thr_init.c:inline_mysql_file_create Unexecuted instantiation: thr_mutex.c:inline_mysql_file_create Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_create Unexecuted instantiation: my_error.c:inline_mysql_file_create Unexecuted instantiation: my_getsystime.c:inline_mysql_file_create Unexecuted instantiation: my_init.c:inline_mysql_file_create Unexecuted instantiation: my_mess.c:inline_mysql_file_create Unexecuted instantiation: my_once.c:inline_mysql_file_create Unexecuted instantiation: my_symlink.c:inline_mysql_file_create Unexecuted instantiation: my_sync.c:inline_mysql_file_create Unexecuted instantiation: charset.c:inline_mysql_file_create Unexecuted instantiation: errors.c:inline_mysql_file_create Unexecuted instantiation: hash.c:inline_mysql_file_create Unexecuted instantiation: mf_dirname.c:inline_mysql_file_create Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_create Unexecuted instantiation: mf_pack.c:inline_mysql_file_create Unexecuted instantiation: my_div.c:inline_mysql_file_create Unexecuted instantiation: my_getwd.c:inline_mysql_file_create Unexecuted instantiation: my_lib.c:inline_mysql_file_create Unexecuted instantiation: my_open.c:inline_mysql_file_create Unexecuted instantiation: my_read.c:inline_mysql_file_create Unexecuted instantiation: array.c:inline_mysql_file_create Unexecuted instantiation: charset-def.c:inline_mysql_file_create Unexecuted instantiation: mf_qsort.c:inline_mysql_file_create |
1041 | | |
1042 | | static inline File |
1043 | | inline_mysql_file_create_temp( |
1044 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1045 | | PSI_file_key key, const char *src_file, uint src_line, |
1046 | | #endif |
1047 | | char *to, const char *dir, const char *pfx, int mode, myf myFlags) |
1048 | 0 | { |
1049 | 0 | File file; |
1050 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1051 | 0 | struct PSI_file_locker *locker; |
1052 | 0 | PSI_file_locker_state state; |
1053 | 0 | locker= PSI_FILE_CALL(get_thread_file_name_locker) |
1054 | 0 | (&state, key, PSI_FILE_CREATE, NULL, &locker); |
1055 | 0 | if (psi_likely(locker != NULL)) |
1056 | 0 | { |
1057 | 0 | PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); |
1058 | 0 | /* The file name is generated by create_temp_file(). */ |
1059 | 0 | file= create_temp_file(to, dir, pfx, mode, myFlags); |
1060 | 0 | PSI_FILE_CALL(end_temp_file_open_wait_and_bind_to_descriptor)(locker, file, (const char*)to); |
1061 | 0 | return file; |
1062 | 0 | } |
1063 | 0 | #endif |
1064 | 0 |
|
1065 | 0 | file= create_temp_file(to, dir, pfx, mode, myFlags); |
1066 | 0 | return file; |
1067 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_create_temp Unexecuted instantiation: my_static.c:inline_mysql_file_create_temp Unexecuted instantiation: my_thr_init.c:inline_mysql_file_create_temp Unexecuted instantiation: thr_mutex.c:inline_mysql_file_create_temp Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_create_temp Unexecuted instantiation: my_error.c:inline_mysql_file_create_temp Unexecuted instantiation: my_getsystime.c:inline_mysql_file_create_temp Unexecuted instantiation: my_init.c:inline_mysql_file_create_temp Unexecuted instantiation: my_mess.c:inline_mysql_file_create_temp Unexecuted instantiation: my_once.c:inline_mysql_file_create_temp Unexecuted instantiation: my_symlink.c:inline_mysql_file_create_temp Unexecuted instantiation: my_sync.c:inline_mysql_file_create_temp Unexecuted instantiation: charset.c:inline_mysql_file_create_temp Unexecuted instantiation: errors.c:inline_mysql_file_create_temp Unexecuted instantiation: hash.c:inline_mysql_file_create_temp Unexecuted instantiation: mf_dirname.c:inline_mysql_file_create_temp Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_create_temp Unexecuted instantiation: mf_pack.c:inline_mysql_file_create_temp Unexecuted instantiation: my_div.c:inline_mysql_file_create_temp Unexecuted instantiation: my_getwd.c:inline_mysql_file_create_temp Unexecuted instantiation: my_lib.c:inline_mysql_file_create_temp Unexecuted instantiation: my_open.c:inline_mysql_file_create_temp Unexecuted instantiation: my_read.c:inline_mysql_file_create_temp Unexecuted instantiation: array.c:inline_mysql_file_create_temp Unexecuted instantiation: charset-def.c:inline_mysql_file_create_temp Unexecuted instantiation: mf_qsort.c:inline_mysql_file_create_temp |
1068 | | |
1069 | | static inline File |
1070 | | inline_mysql_file_open( |
1071 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1072 | | PSI_file_key key, const char *src_file, uint src_line, |
1073 | | #endif |
1074 | | const char *filename, int flags, myf myFlags) |
1075 | 0 | { |
1076 | 0 | File file; |
1077 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1078 | 0 | struct PSI_file_locker *locker; |
1079 | 0 | PSI_file_locker_state state; |
1080 | 0 | locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename, |
1081 | 0 | &locker); |
1082 | 0 | if (psi_likely(locker != NULL)) |
1083 | 0 | { |
1084 | 0 | PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); |
1085 | 0 | file= my_open(filename, flags, myFlags); |
1086 | 0 | PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); |
1087 | 0 | return file; |
1088 | 0 | } |
1089 | 0 | #endif |
1090 | | |
1091 | 0 | file= my_open(filename, flags, myFlags); |
1092 | 0 | return file; |
1093 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_open Unexecuted instantiation: my_static.c:inline_mysql_file_open Unexecuted instantiation: my_thr_init.c:inline_mysql_file_open Unexecuted instantiation: thr_mutex.c:inline_mysql_file_open Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_open Unexecuted instantiation: my_error.c:inline_mysql_file_open Unexecuted instantiation: my_getsystime.c:inline_mysql_file_open Unexecuted instantiation: my_init.c:inline_mysql_file_open Unexecuted instantiation: my_mess.c:inline_mysql_file_open Unexecuted instantiation: my_once.c:inline_mysql_file_open Unexecuted instantiation: my_symlink.c:inline_mysql_file_open Unexecuted instantiation: my_sync.c:inline_mysql_file_open Unexecuted instantiation: charset.c:inline_mysql_file_open Unexecuted instantiation: errors.c:inline_mysql_file_open Unexecuted instantiation: hash.c:inline_mysql_file_open Unexecuted instantiation: mf_dirname.c:inline_mysql_file_open Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_open Unexecuted instantiation: mf_pack.c:inline_mysql_file_open Unexecuted instantiation: my_div.c:inline_mysql_file_open Unexecuted instantiation: my_getwd.c:inline_mysql_file_open Unexecuted instantiation: my_lib.c:inline_mysql_file_open Unexecuted instantiation: my_open.c:inline_mysql_file_open Unexecuted instantiation: my_read.c:inline_mysql_file_open Unexecuted instantiation: array.c:inline_mysql_file_open Unexecuted instantiation: charset-def.c:inline_mysql_file_open Unexecuted instantiation: mf_qsort.c:inline_mysql_file_open |
1094 | | |
1095 | | static inline int |
1096 | | inline_mysql_file_close( |
1097 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1098 | | const char *src_file, uint src_line, |
1099 | | #endif |
1100 | | File file, myf flags) |
1101 | 0 | { |
1102 | 0 | int result; |
1103 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1104 | 0 | struct PSI_file_locker *locker; |
1105 | 0 | PSI_file_locker_state state; |
1106 | 0 | locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE); |
1107 | 0 | if (psi_likely(locker != NULL)) |
1108 | 0 | { |
1109 | 0 | PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); |
1110 | 0 | result= my_close(file, flags); |
1111 | 0 | PSI_FILE_CALL(end_file_close_wait)(locker, result); |
1112 | 0 | return result; |
1113 | 0 | } |
1114 | 0 | #endif |
1115 | | |
1116 | 0 | result= my_close(file, flags); |
1117 | 0 | return result; |
1118 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_close Unexecuted instantiation: my_static.c:inline_mysql_file_close Unexecuted instantiation: my_thr_init.c:inline_mysql_file_close Unexecuted instantiation: thr_mutex.c:inline_mysql_file_close Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_close Unexecuted instantiation: my_error.c:inline_mysql_file_close Unexecuted instantiation: my_getsystime.c:inline_mysql_file_close Unexecuted instantiation: my_init.c:inline_mysql_file_close Unexecuted instantiation: my_mess.c:inline_mysql_file_close Unexecuted instantiation: my_once.c:inline_mysql_file_close Unexecuted instantiation: my_symlink.c:inline_mysql_file_close Unexecuted instantiation: my_sync.c:inline_mysql_file_close Unexecuted instantiation: charset.c:inline_mysql_file_close Unexecuted instantiation: errors.c:inline_mysql_file_close Unexecuted instantiation: hash.c:inline_mysql_file_close Unexecuted instantiation: mf_dirname.c:inline_mysql_file_close Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_close Unexecuted instantiation: mf_pack.c:inline_mysql_file_close Unexecuted instantiation: my_div.c:inline_mysql_file_close Unexecuted instantiation: my_getwd.c:inline_mysql_file_close Unexecuted instantiation: my_lib.c:inline_mysql_file_close Unexecuted instantiation: my_open.c:inline_mysql_file_close Unexecuted instantiation: my_read.c:inline_mysql_file_close Unexecuted instantiation: array.c:inline_mysql_file_close Unexecuted instantiation: charset-def.c:inline_mysql_file_close Unexecuted instantiation: mf_qsort.c:inline_mysql_file_close |
1119 | | |
1120 | | static inline size_t |
1121 | | inline_mysql_file_read( |
1122 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1123 | | const char *src_file, uint src_line, |
1124 | | #endif |
1125 | | File file, uchar *buffer, size_t count, myf flags) |
1126 | 0 | { |
1127 | 0 | size_t result; |
1128 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1129 | 0 | struct PSI_file_locker *locker; |
1130 | 0 | PSI_file_locker_state state; |
1131 | 0 | size_t bytes_read; |
1132 | 0 | locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); |
1133 | 0 | if (psi_likely(locker != NULL)) |
1134 | 0 | { |
1135 | 0 | PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); |
1136 | 0 | result= my_read(file, buffer, count, flags); |
1137 | 0 | if (flags & (MY_NABP | MY_FNABP)) |
1138 | 0 | bytes_read= (result == 0) ? count : 0; |
1139 | 0 | else |
1140 | 0 | bytes_read= (result != MY_FILE_ERROR) ? result : 0; |
1141 | 0 | PSI_FILE_CALL(end_file_wait)(locker, bytes_read); |
1142 | 0 | return result; |
1143 | 0 | } |
1144 | 0 | #endif |
1145 | | |
1146 | 0 | result= my_read(file, buffer, count, flags); |
1147 | 0 | return result; |
1148 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_read Unexecuted instantiation: my_static.c:inline_mysql_file_read Unexecuted instantiation: my_thr_init.c:inline_mysql_file_read Unexecuted instantiation: thr_mutex.c:inline_mysql_file_read Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_read Unexecuted instantiation: my_error.c:inline_mysql_file_read Unexecuted instantiation: my_getsystime.c:inline_mysql_file_read Unexecuted instantiation: my_init.c:inline_mysql_file_read Unexecuted instantiation: my_mess.c:inline_mysql_file_read Unexecuted instantiation: my_once.c:inline_mysql_file_read Unexecuted instantiation: my_symlink.c:inline_mysql_file_read Unexecuted instantiation: my_sync.c:inline_mysql_file_read Unexecuted instantiation: charset.c:inline_mysql_file_read Unexecuted instantiation: errors.c:inline_mysql_file_read Unexecuted instantiation: hash.c:inline_mysql_file_read Unexecuted instantiation: mf_dirname.c:inline_mysql_file_read Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_read Unexecuted instantiation: mf_pack.c:inline_mysql_file_read Unexecuted instantiation: my_div.c:inline_mysql_file_read Unexecuted instantiation: my_getwd.c:inline_mysql_file_read Unexecuted instantiation: my_lib.c:inline_mysql_file_read Unexecuted instantiation: my_open.c:inline_mysql_file_read Unexecuted instantiation: my_read.c:inline_mysql_file_read Unexecuted instantiation: array.c:inline_mysql_file_read Unexecuted instantiation: charset-def.c:inline_mysql_file_read Unexecuted instantiation: mf_qsort.c:inline_mysql_file_read |
1149 | | |
1150 | | static inline size_t |
1151 | | inline_mysql_file_write( |
1152 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1153 | | const char *src_file, uint src_line, |
1154 | | #endif |
1155 | | File file, const uchar *buffer, size_t count, myf flags) |
1156 | 0 | { |
1157 | 0 | size_t result; |
1158 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1159 | 0 | struct PSI_file_locker *locker; |
1160 | 0 | PSI_file_locker_state state; |
1161 | 0 | size_t bytes_written; |
1162 | 0 | locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE); |
1163 | 0 | if (psi_likely(locker != NULL)) |
1164 | 0 | { |
1165 | 0 | PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); |
1166 | 0 | result= my_write(file, buffer, count, flags); |
1167 | 0 | if (flags & (MY_NABP | MY_FNABP)) |
1168 | 0 | bytes_written= (result == 0) ? count : 0; |
1169 | 0 | else |
1170 | 0 | bytes_written= (result != MY_FILE_ERROR) ? result : 0; |
1171 | 0 | PSI_FILE_CALL(end_file_wait)(locker, bytes_written); |
1172 | 0 | return result; |
1173 | 0 | } |
1174 | 0 | #endif |
1175 | 0 |
|
1176 | 0 | result= my_write(file, buffer, count, flags); |
1177 | 0 | return result; |
1178 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_write Unexecuted instantiation: my_static.c:inline_mysql_file_write Unexecuted instantiation: my_thr_init.c:inline_mysql_file_write Unexecuted instantiation: thr_mutex.c:inline_mysql_file_write Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_write Unexecuted instantiation: my_error.c:inline_mysql_file_write Unexecuted instantiation: my_getsystime.c:inline_mysql_file_write Unexecuted instantiation: my_init.c:inline_mysql_file_write Unexecuted instantiation: my_mess.c:inline_mysql_file_write Unexecuted instantiation: my_once.c:inline_mysql_file_write Unexecuted instantiation: my_symlink.c:inline_mysql_file_write Unexecuted instantiation: my_sync.c:inline_mysql_file_write Unexecuted instantiation: charset.c:inline_mysql_file_write Unexecuted instantiation: errors.c:inline_mysql_file_write Unexecuted instantiation: hash.c:inline_mysql_file_write Unexecuted instantiation: mf_dirname.c:inline_mysql_file_write Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_write Unexecuted instantiation: mf_pack.c:inline_mysql_file_write Unexecuted instantiation: my_div.c:inline_mysql_file_write Unexecuted instantiation: my_getwd.c:inline_mysql_file_write Unexecuted instantiation: my_lib.c:inline_mysql_file_write Unexecuted instantiation: my_open.c:inline_mysql_file_write Unexecuted instantiation: my_read.c:inline_mysql_file_write Unexecuted instantiation: array.c:inline_mysql_file_write Unexecuted instantiation: charset-def.c:inline_mysql_file_write Unexecuted instantiation: mf_qsort.c:inline_mysql_file_write |
1179 | | |
1180 | | static inline size_t |
1181 | | inline_mysql_file_pread( |
1182 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1183 | | const char *src_file, uint src_line, |
1184 | | #endif |
1185 | | File file, uchar *buffer, size_t count, my_off_t offset, myf flags) |
1186 | 0 | { |
1187 | 0 | size_t result; |
1188 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1189 | 0 | struct PSI_file_locker *locker; |
1190 | 0 | PSI_file_locker_state state; |
1191 | 0 | size_t bytes_read; |
1192 | 0 | locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); |
1193 | 0 | if (psi_likely(locker != NULL)) |
1194 | 0 | { |
1195 | 0 | PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); |
1196 | 0 | result= my_pread(file, buffer, count, offset, flags); |
1197 | 0 | if (flags & (MY_NABP | MY_FNABP)) |
1198 | 0 | bytes_read= (result == 0) ? count : 0; |
1199 | 0 | else |
1200 | 0 | bytes_read= (result != MY_FILE_ERROR) ? result : 0; |
1201 | 0 | PSI_FILE_CALL(end_file_wait)(locker, bytes_read); |
1202 | 0 | return result; |
1203 | 0 | } |
1204 | 0 | #endif |
1205 | 0 |
|
1206 | 0 | result= my_pread(file, buffer, count, offset, flags); |
1207 | 0 | return result; |
1208 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_pread Unexecuted instantiation: my_static.c:inline_mysql_file_pread Unexecuted instantiation: my_thr_init.c:inline_mysql_file_pread Unexecuted instantiation: thr_mutex.c:inline_mysql_file_pread Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_pread Unexecuted instantiation: my_error.c:inline_mysql_file_pread Unexecuted instantiation: my_getsystime.c:inline_mysql_file_pread Unexecuted instantiation: my_init.c:inline_mysql_file_pread Unexecuted instantiation: my_mess.c:inline_mysql_file_pread Unexecuted instantiation: my_once.c:inline_mysql_file_pread Unexecuted instantiation: my_symlink.c:inline_mysql_file_pread Unexecuted instantiation: my_sync.c:inline_mysql_file_pread Unexecuted instantiation: charset.c:inline_mysql_file_pread Unexecuted instantiation: errors.c:inline_mysql_file_pread Unexecuted instantiation: hash.c:inline_mysql_file_pread Unexecuted instantiation: mf_dirname.c:inline_mysql_file_pread Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_pread Unexecuted instantiation: mf_pack.c:inline_mysql_file_pread Unexecuted instantiation: my_div.c:inline_mysql_file_pread Unexecuted instantiation: my_getwd.c:inline_mysql_file_pread Unexecuted instantiation: my_lib.c:inline_mysql_file_pread Unexecuted instantiation: my_open.c:inline_mysql_file_pread Unexecuted instantiation: my_read.c:inline_mysql_file_pread Unexecuted instantiation: array.c:inline_mysql_file_pread Unexecuted instantiation: charset-def.c:inline_mysql_file_pread Unexecuted instantiation: mf_qsort.c:inline_mysql_file_pread |
1209 | | |
1210 | | static inline size_t |
1211 | | inline_mysql_file_pwrite( |
1212 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1213 | | const char *src_file, uint src_line, |
1214 | | #endif |
1215 | | File file, const uchar *buffer, size_t count, my_off_t offset, myf flags) |
1216 | 0 | { |
1217 | 0 | size_t result; |
1218 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1219 | 0 | struct PSI_file_locker *locker; |
1220 | 0 | PSI_file_locker_state state; |
1221 | 0 | size_t bytes_written; |
1222 | 0 | locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE); |
1223 | 0 | if (psi_likely(locker != NULL)) |
1224 | 0 | { |
1225 | 0 | PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); |
1226 | 0 | result= my_pwrite(file, buffer, count, offset, flags); |
1227 | 0 | if (flags & (MY_NABP | MY_FNABP)) |
1228 | 0 | bytes_written= (result == 0) ? count : 0; |
1229 | 0 | else |
1230 | 0 | bytes_written= (result != MY_FILE_ERROR) ? result : 0; |
1231 | 0 | PSI_FILE_CALL(end_file_wait)(locker, bytes_written); |
1232 | 0 | return result; |
1233 | 0 | } |
1234 | 0 | #endif |
1235 | 0 |
|
1236 | 0 | result= my_pwrite(file, buffer, count, offset, flags); |
1237 | 0 | return result; |
1238 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_pwrite Unexecuted instantiation: my_static.c:inline_mysql_file_pwrite Unexecuted instantiation: my_thr_init.c:inline_mysql_file_pwrite Unexecuted instantiation: thr_mutex.c:inline_mysql_file_pwrite Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_pwrite Unexecuted instantiation: my_error.c:inline_mysql_file_pwrite Unexecuted instantiation: my_getsystime.c:inline_mysql_file_pwrite Unexecuted instantiation: my_init.c:inline_mysql_file_pwrite Unexecuted instantiation: my_mess.c:inline_mysql_file_pwrite Unexecuted instantiation: my_once.c:inline_mysql_file_pwrite Unexecuted instantiation: my_symlink.c:inline_mysql_file_pwrite Unexecuted instantiation: my_sync.c:inline_mysql_file_pwrite Unexecuted instantiation: charset.c:inline_mysql_file_pwrite Unexecuted instantiation: errors.c:inline_mysql_file_pwrite Unexecuted instantiation: hash.c:inline_mysql_file_pwrite Unexecuted instantiation: mf_dirname.c:inline_mysql_file_pwrite Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_pwrite Unexecuted instantiation: mf_pack.c:inline_mysql_file_pwrite Unexecuted instantiation: my_div.c:inline_mysql_file_pwrite Unexecuted instantiation: my_getwd.c:inline_mysql_file_pwrite Unexecuted instantiation: my_lib.c:inline_mysql_file_pwrite Unexecuted instantiation: my_open.c:inline_mysql_file_pwrite Unexecuted instantiation: my_read.c:inline_mysql_file_pwrite Unexecuted instantiation: array.c:inline_mysql_file_pwrite Unexecuted instantiation: charset-def.c:inline_mysql_file_pwrite Unexecuted instantiation: mf_qsort.c:inline_mysql_file_pwrite |
1239 | | |
1240 | | static inline my_off_t |
1241 | | inline_mysql_file_seek( |
1242 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1243 | | const char *src_file, uint src_line, |
1244 | | #endif |
1245 | | File file, my_off_t pos, int whence, myf flags) |
1246 | 0 | { |
1247 | 0 | my_off_t result; |
1248 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1249 | 0 | struct PSI_file_locker *locker; |
1250 | 0 | PSI_file_locker_state state; |
1251 | 0 | locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK); |
1252 | 0 | if (psi_likely(locker != NULL)) |
1253 | 0 | { |
1254 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); |
1255 | 0 | result= my_seek(file, pos, whence, flags); |
1256 | 0 | PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); |
1257 | 0 | return result; |
1258 | 0 | } |
1259 | 0 | #endif |
1260 | 0 |
|
1261 | 0 | result= my_seek(file, pos, whence, flags); |
1262 | 0 | return result; |
1263 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_seek Unexecuted instantiation: my_static.c:inline_mysql_file_seek Unexecuted instantiation: my_thr_init.c:inline_mysql_file_seek Unexecuted instantiation: thr_mutex.c:inline_mysql_file_seek Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_seek Unexecuted instantiation: my_error.c:inline_mysql_file_seek Unexecuted instantiation: my_getsystime.c:inline_mysql_file_seek Unexecuted instantiation: my_init.c:inline_mysql_file_seek Unexecuted instantiation: my_mess.c:inline_mysql_file_seek Unexecuted instantiation: my_once.c:inline_mysql_file_seek Unexecuted instantiation: my_symlink.c:inline_mysql_file_seek Unexecuted instantiation: my_sync.c:inline_mysql_file_seek Unexecuted instantiation: charset.c:inline_mysql_file_seek Unexecuted instantiation: errors.c:inline_mysql_file_seek Unexecuted instantiation: hash.c:inline_mysql_file_seek Unexecuted instantiation: mf_dirname.c:inline_mysql_file_seek Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_seek Unexecuted instantiation: mf_pack.c:inline_mysql_file_seek Unexecuted instantiation: my_div.c:inline_mysql_file_seek Unexecuted instantiation: my_getwd.c:inline_mysql_file_seek Unexecuted instantiation: my_lib.c:inline_mysql_file_seek Unexecuted instantiation: my_open.c:inline_mysql_file_seek Unexecuted instantiation: my_read.c:inline_mysql_file_seek Unexecuted instantiation: array.c:inline_mysql_file_seek Unexecuted instantiation: charset-def.c:inline_mysql_file_seek Unexecuted instantiation: mf_qsort.c:inline_mysql_file_seek |
1264 | | |
1265 | | static inline my_off_t |
1266 | | inline_mysql_file_tell( |
1267 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1268 | | const char *src_file, uint src_line, |
1269 | | #endif |
1270 | | File file, myf flags) |
1271 | 0 | { |
1272 | 0 | my_off_t result; |
1273 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1274 | 0 | struct PSI_file_locker *locker; |
1275 | 0 | PSI_file_locker_state state; |
1276 | 0 | locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_TELL); |
1277 | 0 | if (psi_likely(locker != NULL)) |
1278 | 0 | { |
1279 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); |
1280 | 0 | result= my_tell(file, flags); |
1281 | 0 | PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); |
1282 | 0 | return result; |
1283 | 0 | } |
1284 | 0 | #endif |
1285 | 0 |
|
1286 | 0 | result= my_tell(file, flags); |
1287 | 0 | return result; |
1288 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_tell Unexecuted instantiation: my_static.c:inline_mysql_file_tell Unexecuted instantiation: my_thr_init.c:inline_mysql_file_tell Unexecuted instantiation: thr_mutex.c:inline_mysql_file_tell Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_tell Unexecuted instantiation: my_error.c:inline_mysql_file_tell Unexecuted instantiation: my_getsystime.c:inline_mysql_file_tell Unexecuted instantiation: my_init.c:inline_mysql_file_tell Unexecuted instantiation: my_mess.c:inline_mysql_file_tell Unexecuted instantiation: my_once.c:inline_mysql_file_tell Unexecuted instantiation: my_symlink.c:inline_mysql_file_tell Unexecuted instantiation: my_sync.c:inline_mysql_file_tell Unexecuted instantiation: charset.c:inline_mysql_file_tell Unexecuted instantiation: errors.c:inline_mysql_file_tell Unexecuted instantiation: hash.c:inline_mysql_file_tell Unexecuted instantiation: mf_dirname.c:inline_mysql_file_tell Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_tell Unexecuted instantiation: mf_pack.c:inline_mysql_file_tell Unexecuted instantiation: my_div.c:inline_mysql_file_tell Unexecuted instantiation: my_getwd.c:inline_mysql_file_tell Unexecuted instantiation: my_lib.c:inline_mysql_file_tell Unexecuted instantiation: my_open.c:inline_mysql_file_tell Unexecuted instantiation: my_read.c:inline_mysql_file_tell Unexecuted instantiation: array.c:inline_mysql_file_tell Unexecuted instantiation: charset-def.c:inline_mysql_file_tell Unexecuted instantiation: mf_qsort.c:inline_mysql_file_tell |
1289 | | |
1290 | | static inline int |
1291 | | inline_mysql_file_delete( |
1292 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1293 | | PSI_file_key key, const char *src_file, uint src_line, |
1294 | | #endif |
1295 | | const char *name, myf flags) |
1296 | 0 | { |
1297 | 0 | int result; |
1298 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1299 | 0 | struct PSI_file_locker *locker; |
1300 | 0 | PSI_file_locker_state state; |
1301 | 0 | locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, name, &locker); |
1302 | 0 | if (psi_likely(locker != NULL)) |
1303 | 0 | { |
1304 | 0 | PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); |
1305 | 0 | result= my_delete(name, flags); |
1306 | 0 | PSI_FILE_CALL(end_file_close_wait)(locker, result); |
1307 | 0 | return result; |
1308 | 0 | } |
1309 | 0 | #endif |
1310 | 0 |
|
1311 | 0 | result= my_delete(name, flags); |
1312 | 0 | return result; |
1313 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_delete Unexecuted instantiation: my_static.c:inline_mysql_file_delete Unexecuted instantiation: my_thr_init.c:inline_mysql_file_delete Unexecuted instantiation: thr_mutex.c:inline_mysql_file_delete Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_delete Unexecuted instantiation: my_error.c:inline_mysql_file_delete Unexecuted instantiation: my_getsystime.c:inline_mysql_file_delete Unexecuted instantiation: my_init.c:inline_mysql_file_delete Unexecuted instantiation: my_mess.c:inline_mysql_file_delete Unexecuted instantiation: my_once.c:inline_mysql_file_delete Unexecuted instantiation: my_symlink.c:inline_mysql_file_delete Unexecuted instantiation: my_sync.c:inline_mysql_file_delete Unexecuted instantiation: charset.c:inline_mysql_file_delete Unexecuted instantiation: errors.c:inline_mysql_file_delete Unexecuted instantiation: hash.c:inline_mysql_file_delete Unexecuted instantiation: mf_dirname.c:inline_mysql_file_delete Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_delete Unexecuted instantiation: mf_pack.c:inline_mysql_file_delete Unexecuted instantiation: my_div.c:inline_mysql_file_delete Unexecuted instantiation: my_getwd.c:inline_mysql_file_delete Unexecuted instantiation: my_lib.c:inline_mysql_file_delete Unexecuted instantiation: my_open.c:inline_mysql_file_delete Unexecuted instantiation: my_read.c:inline_mysql_file_delete Unexecuted instantiation: array.c:inline_mysql_file_delete Unexecuted instantiation: charset-def.c:inline_mysql_file_delete Unexecuted instantiation: mf_qsort.c:inline_mysql_file_delete |
1314 | | |
1315 | | static inline int |
1316 | | inline_mysql_file_rename( |
1317 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1318 | | PSI_file_key key, const char *src_file, uint src_line, |
1319 | | #endif |
1320 | | const char *from, const char *to, myf flags) |
1321 | 0 | { |
1322 | 0 | int result; |
1323 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1324 | 0 | struct PSI_file_locker *locker; |
1325 | 0 | PSI_file_locker_state state; |
1326 | 0 | locker= PSI_FILE_CALL(get_thread_file_name_locker) |
1327 | 0 | (&state, key, PSI_FILE_RENAME, from, &locker); |
1328 | 0 | if (psi_likely(locker != NULL)) |
1329 | 0 | { |
1330 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); |
1331 | 0 | result= my_rename(from, to, flags); |
1332 | 0 | PSI_FILE_CALL(end_file_rename_wait)(locker, from, to, result); |
1333 | 0 | return result; |
1334 | 0 | } |
1335 | 0 | #endif |
1336 | 0 |
|
1337 | 0 | result= my_rename(from, to, flags); |
1338 | 0 | return result; |
1339 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_rename Unexecuted instantiation: my_static.c:inline_mysql_file_rename Unexecuted instantiation: my_thr_init.c:inline_mysql_file_rename Unexecuted instantiation: thr_mutex.c:inline_mysql_file_rename Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_rename Unexecuted instantiation: my_error.c:inline_mysql_file_rename Unexecuted instantiation: my_getsystime.c:inline_mysql_file_rename Unexecuted instantiation: my_init.c:inline_mysql_file_rename Unexecuted instantiation: my_mess.c:inline_mysql_file_rename Unexecuted instantiation: my_once.c:inline_mysql_file_rename Unexecuted instantiation: my_symlink.c:inline_mysql_file_rename Unexecuted instantiation: my_sync.c:inline_mysql_file_rename Unexecuted instantiation: charset.c:inline_mysql_file_rename Unexecuted instantiation: errors.c:inline_mysql_file_rename Unexecuted instantiation: hash.c:inline_mysql_file_rename Unexecuted instantiation: mf_dirname.c:inline_mysql_file_rename Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_rename Unexecuted instantiation: mf_pack.c:inline_mysql_file_rename Unexecuted instantiation: my_div.c:inline_mysql_file_rename Unexecuted instantiation: my_getwd.c:inline_mysql_file_rename Unexecuted instantiation: my_lib.c:inline_mysql_file_rename Unexecuted instantiation: my_open.c:inline_mysql_file_rename Unexecuted instantiation: my_read.c:inline_mysql_file_rename Unexecuted instantiation: array.c:inline_mysql_file_rename Unexecuted instantiation: charset-def.c:inline_mysql_file_rename Unexecuted instantiation: mf_qsort.c:inline_mysql_file_rename |
1340 | | |
1341 | | |
1342 | | static inline File |
1343 | | inline_mysql_file_create_with_symlink( |
1344 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1345 | | PSI_file_key key, const char *src_file, uint src_line, |
1346 | | #endif |
1347 | | const char *linkname, const char *filename, int create_flags, |
1348 | | int access_flags, myf flags) |
1349 | 0 | { |
1350 | 0 | File file; |
1351 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1352 | 0 | struct PSI_file_locker *locker; |
1353 | 0 | PSI_file_locker_state state; |
1354 | 0 | locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename, |
1355 | 0 | &locker); |
1356 | 0 | if (psi_likely(locker != NULL)) |
1357 | 0 | { |
1358 | 0 | PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); |
1359 | 0 | file= my_create_with_symlink(linkname, filename, create_flags, access_flags, |
1360 | 0 | flags); |
1361 | 0 | PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); |
1362 | 0 | return file; |
1363 | 0 | } |
1364 | 0 | #endif |
1365 | 0 |
|
1366 | 0 | file= my_create_with_symlink(linkname, filename, create_flags, access_flags, |
1367 | 0 | flags); |
1368 | 0 | return file; |
1369 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_static.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_thr_init.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: thr_mutex.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_error.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_getsystime.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_init.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_mess.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_once.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_symlink.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_sync.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: charset.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: errors.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: hash.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: mf_dirname.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: mf_pack.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_div.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_getwd.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_lib.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_open.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: my_read.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: array.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: charset-def.c:inline_mysql_file_create_with_symlink Unexecuted instantiation: mf_qsort.c:inline_mysql_file_create_with_symlink |
1370 | | |
1371 | | |
1372 | | static inline int |
1373 | | inline_mysql_file_delete_with_symlink( |
1374 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1375 | | PSI_file_key key, const char *src_file, uint src_line, |
1376 | | #endif |
1377 | | const char *name, const char *ext, myf flags) |
1378 | 0 | { |
1379 | 0 | int result; |
1380 | 0 | char buf[FN_REFLEN]; |
1381 | 0 | char *fullname= fn_format(buf, name, "", ext, MY_UNPACK_FILENAME | MY_APPEND_EXT); |
1382 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1383 | 0 | struct PSI_file_locker *locker; |
1384 | 0 | PSI_file_locker_state state; |
1385 | 0 | locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, fullname, |
1386 | 0 | &locker); |
1387 | 0 | if (psi_likely(locker != NULL)) |
1388 | 0 | { |
1389 | 0 | PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); |
1390 | 0 | result= my_handler_delete_with_symlink(fullname, flags); |
1391 | 0 | PSI_FILE_CALL(end_file_close_wait)(locker, result); |
1392 | 0 | return result; |
1393 | 0 | } |
1394 | 0 | #endif |
1395 | 0 |
|
1396 | 0 | result= my_handler_delete_with_symlink(fullname, flags); |
1397 | 0 | return result; |
1398 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_static.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_thr_init.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: thr_mutex.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_error.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_getsystime.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_init.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_mess.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_once.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_symlink.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_sync.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: charset.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: errors.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: hash.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: mf_dirname.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: mf_pack.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_div.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_getwd.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_lib.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_open.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: my_read.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: array.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: charset-def.c:inline_mysql_file_delete_with_symlink Unexecuted instantiation: mf_qsort.c:inline_mysql_file_delete_with_symlink |
1399 | | |
1400 | | |
1401 | | static inline int |
1402 | | inline_mysql_file_rename_with_symlink( |
1403 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1404 | | PSI_file_key key, const char *src_file, uint src_line, |
1405 | | #endif |
1406 | | const char *from, const char *to, myf flags) |
1407 | 0 | { |
1408 | 0 | int result; |
1409 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1410 | 0 | struct PSI_file_locker *locker; |
1411 | 0 | PSI_file_locker_state state; |
1412 | 0 | locker= PSI_FILE_CALL(get_thread_file_name_locker) |
1413 | 0 | (&state, key, PSI_FILE_RENAME, from, &locker); |
1414 | 0 | if (psi_likely(locker != NULL)) |
1415 | 0 | { |
1416 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); |
1417 | 0 | result= my_rename_with_symlink(from, to, flags); |
1418 | 0 | PSI_FILE_CALL(end_file_rename_wait)(locker, from, to, result); |
1419 | 0 | return result; |
1420 | 0 | } |
1421 | 0 | #endif |
1422 | 0 |
|
1423 | 0 | result= my_rename_with_symlink(from, to, flags); |
1424 | 0 | return result; |
1425 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_static.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_thr_init.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: thr_mutex.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_error.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_getsystime.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_init.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_mess.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_once.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_symlink.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_sync.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: charset.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: errors.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: hash.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: mf_dirname.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: mf_pack.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_div.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_getwd.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_lib.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_open.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: my_read.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: array.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: charset-def.c:inline_mysql_file_rename_with_symlink Unexecuted instantiation: mf_qsort.c:inline_mysql_file_rename_with_symlink |
1426 | | |
1427 | | static inline int |
1428 | | inline_mysql_file_sync( |
1429 | | #ifdef HAVE_PSI_FILE_INTERFACE |
1430 | | const char *src_file, uint src_line, |
1431 | | #endif |
1432 | | File fd, myf flags) |
1433 | 0 | { |
1434 | 0 | int result= 0; |
1435 | 0 | #ifdef HAVE_PSI_FILE_INTERFACE |
1436 | 0 | struct PSI_file_locker *locker; |
1437 | 0 | PSI_file_locker_state state; |
1438 | 0 | locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); |
1439 | 0 | if (psi_likely(locker != NULL)) |
1440 | 0 | { |
1441 | 0 | PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); |
1442 | 0 | result= my_sync(fd, flags); |
1443 | 0 | PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); |
1444 | 0 | return result; |
1445 | 0 | } |
1446 | 0 | #endif |
1447 | 0 |
|
1448 | 0 | result= my_sync(fd, flags); |
1449 | 0 | return result; |
1450 | 0 | } Unexecuted instantiation: my_malloc.c:inline_mysql_file_sync Unexecuted instantiation: my_static.c:inline_mysql_file_sync Unexecuted instantiation: my_thr_init.c:inline_mysql_file_sync Unexecuted instantiation: thr_mutex.c:inline_mysql_file_sync Unexecuted instantiation: thr_rwlock.c:inline_mysql_file_sync Unexecuted instantiation: my_error.c:inline_mysql_file_sync Unexecuted instantiation: my_getsystime.c:inline_mysql_file_sync Unexecuted instantiation: my_init.c:inline_mysql_file_sync Unexecuted instantiation: my_mess.c:inline_mysql_file_sync Unexecuted instantiation: my_once.c:inline_mysql_file_sync Unexecuted instantiation: my_symlink.c:inline_mysql_file_sync Unexecuted instantiation: my_sync.c:inline_mysql_file_sync Unexecuted instantiation: charset.c:inline_mysql_file_sync Unexecuted instantiation: errors.c:inline_mysql_file_sync Unexecuted instantiation: hash.c:inline_mysql_file_sync Unexecuted instantiation: mf_dirname.c:inline_mysql_file_sync Unexecuted instantiation: mf_loadpath.c:inline_mysql_file_sync Unexecuted instantiation: mf_pack.c:inline_mysql_file_sync Unexecuted instantiation: my_div.c:inline_mysql_file_sync Unexecuted instantiation: my_getwd.c:inline_mysql_file_sync Unexecuted instantiation: my_lib.c:inline_mysql_file_sync Unexecuted instantiation: my_open.c:inline_mysql_file_sync Unexecuted instantiation: my_read.c:inline_mysql_file_sync Unexecuted instantiation: array.c:inline_mysql_file_sync Unexecuted instantiation: charset-def.c:inline_mysql_file_sync Unexecuted instantiation: mf_qsort.c:inline_mysql_file_sync |
1451 | | |
1452 | | /** @} (end of group File_instrumentation) */ |
1453 | | |
1454 | | #endif |