From 196e8529837558a72baf31d012285cc283b8e95d Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 18 May 2015 11:54:55 +0200 Subject: 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 --- sql/wsrep_binlog.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/wsrep_binlog.cc') diff --git a/sql/wsrep_binlog.cc b/sql/wsrep_binlog.cc index f37d9e0fbc9..b71da709eda 100644 --- a/sql/wsrep_binlog.cc +++ b/sql/wsrep_binlog.cc @@ -458,7 +458,7 @@ void wsrep_dump_rbr_buf_with_header(THD *thd, const void *rbr_buf, goto cleanup2; } - if (ev->write(&cache) || my_b_write(&cache, rbr_buf, buf_len) || + if (ev->write(&cache) || my_b_write(&cache, (uchar*)rbr_buf, buf_len) || flush_io_cache(&cache)) { WSREP_ERROR("Failed to write to '%s'.", filename); -- cgit v1.2.1