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

Function real_open_cached_file

mysys/mf_cache.c:81–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 /* Create the temporary file */
80
81my_bool real_open_cached_file(IO_CACHE *cache)
82{
83 char name_buff[FN_REFLEN];
84 int error=1;
85 DBUG_ENTER("real_open_cached_file");
86 if ((cache->file=create_temp_file(name_buff, cache->dir, cache->prefix,
87 (O_RDWR | O_BINARY | O_TRUNC |
88 O_TEMPORARY | O_SHORT_LIVED),
89 MYF(MY_WME))) >= 0)
90 {
91 error=0;
92 cache_remove_open_tmp(cache, name_buff);
93 }
94 DBUG_RETURN(error);
95}
96
97
98void close_cached_file(IO_CACHE *cache)

Callers 1

my_b_flush_io_cacheFunction · 0.85

Calls 2

create_temp_fileFunction · 0.85
cache_remove_open_tmpFunction · 0.85

Tested by

no test coverage detected