diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-05-18 11:54:55 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-06-02 18:53:37 +0200 |
commit | 196e8529837558a72baf31d012285cc283b8e95d (patch) | |
tree | 75feb69d20c5fb5944dd6195bf00440143497232 /sql/uniques.cc | |
parent | 1841557e407038e3611b0788eaf70fd3d8eb043e (diff) | |
download | mariadb-git-196e8529837558a72baf31d012285cc283b8e95d.tar.gz |
misc IO_CACHE cleanups
* remove unused (and not implemented) WRITE_NET type
* remove cast in my_b_write() macro. my_b_* macros are
function-like, casts are responsibility of the caller
* replace hackish _my_b_write(info,0,0) with the explicit
my_b_flush_io_cache() in my_b_write_byte()
* remove unused my_b_fill_cache()
* replace pbool -> my_bool
* make internal IO_CACHE functions static
* reformat comments, correct typos, remove obsolete comments (ISAM)
* assert valid cache type in init_functions()
* use IO_ROUND_DN() macro where appropriate
* remove unused DBUG_EXECUTE_IF in _my_b_cache_write()
* remove unnecessary __attribute__((unused))
* fix goto error in parse_file.cc
* remove redundant reinit_io_cache() in uniques.cc
* don't do reinit_io_cache() if the cache was not initialized
in ma_check.c
* extract duplicate functionality from various _my_b_*_read
functions into a common wrapper. Same for _my_b_*_write
* create _my_b_cache_write_r instead of having if's in
_my_b_cache_write (similar to existing _my_b_cache_read and
_my_b_cache_read_r)
* don't call mysql_file_write() from my_b_flush_io_cache(),
call info->write_function() instead
Diffstat (limited to 'sql/uniques.cc')
-rw-r--r-- | sql/uniques.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/uniques.cc b/sql/uniques.cc index c755293035b..63eb6e0eb90 100644 --- a/sql/uniques.cc +++ b/sql/uniques.cc @@ -53,7 +53,7 @@ int unique_write_to_file(uchar* key, element_count count, Unique *unique) int unique_write_to_file_with_count(uchar* key, element_count count, Unique *unique) { return my_b_write(&unique->file, key, unique->size) || - my_b_write(&unique->file, &count, sizeof(element_count)) ? 1 : 0; + my_b_write(&unique->file, (uchar*)&count, sizeof(element_count)) ? 1 : 0; } int unique_write_to_ptrs(uchar* key, element_count count, Unique *unique) @@ -694,7 +694,6 @@ bool Unique::merge(TABLE *table, uchar *buff, bool without_last_merge) open_cached_file(outfile,mysql_tmpdir,TEMP_PREFIX,READ_RECORD_BUFFER, MYF(MY_WME)))) return 1; - reinit_io_cache(outfile,WRITE_CACHE,0L,0,0); Sort_param sort_param; bzero((char*) &sort_param,sizeof(sort_param)); |