Commit ce5b8e59 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: clarify the function name and purpose

and make it static
parent d500c22f
......@@ -513,7 +513,6 @@ extern PSI_file_key key_file_io_cache;
/* inline functions for mf_iocache */
extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock);
extern void end_tracking_io_cache(IO_CACHE *info);
extern void truncate_io_cache(IO_CACHE *info);
extern int _my_b_get(IO_CACHE *info);
extern int _my_b_read(IO_CACHE *info,uchar *Buffer,size_t Count);
......
......@@ -104,13 +104,13 @@ my_bool io_cache_tmp_file_track(IO_CACHE *info, ulonglong file_size)
/**
End tmp space tracking for the data in the io cache
Reset tmp space tracking for the data in the io cache
This is called when deleting or truncating the
cached file.
*/
void end_tracking_io_cache(IO_CACHE *info)
static void reset_tracking_io_cache(IO_CACHE *info)
{
if ((info->myflags & (MY_TRACK | MY_TRACK_WITH_LIMIT)) &&
info->tracking.file_size)
......@@ -123,7 +123,7 @@ void end_tracking_io_cache(IO_CACHE *info)
void truncate_io_cache(IO_CACHE *info)
{
if (my_chsize(info->file, 0, 0, MYF(MY_WME)) == 0)
end_tracking_io_cache(info);
reset_tracking_io_cache(info);
}
......@@ -1870,7 +1870,7 @@ int end_io_cache(IO_CACHE *info)
/* Destroy allocated mutex */
mysql_mutex_destroy(&info->append_buffer_lock);
}
end_tracking_io_cache(info);
reset_tracking_io_cache(info);
info->share= 0;
info->type= TYPE_NOT_SET; /* Ensure that flush_io_cache() does nothing */
info->write_end= 0; /* Ensure that my_b_write() fails */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment