| 96 | |
| 97 | |
| 98 | void close_cached_file(IO_CACHE *cache) |
| 99 | { |
| 100 | DBUG_ENTER("close_cached_file"); |
| 101 | if (my_b_inited(cache)) |
| 102 | { |
| 103 | File file=cache->file; |
| 104 | cache->file= -1; /* Don't flush data */ |
| 105 | (void) end_io_cache(cache); |
| 106 | if (file >= 0) |
| 107 | { |
| 108 | (void) my_close(file,MYF(0)); |
| 109 | #ifdef CANT_DELETE_OPEN_FILES |
| 110 | if (cache->file_name) |
| 111 | { |
| 112 | (void) my_delete(cache->file_name,MYF(MY_WME | ME_NOINPUT)); |
| 113 | my_free(cache->file_name); |
| 114 | } |
| 115 | #endif |
| 116 | } |
| 117 | my_free(cache->dir); |
| 118 | my_free(cache->prefix); |
| 119 | } |
| 120 | DBUG_VOID_RETURN; |
| 121 | } |
nothing calls this directly
no test coverage detected