Ensures that the input IO Cache is consistent with where its data is stored, i.e that the data is entirely either stored in-memory or backed by a temporary file. In actuality, it is simple: if the IO Cache is actively backed by a temporary file (i.e. the transaction or statement data is sufficiently large to exceed its respective binlog_cache_size), then ensure all data is flushed to the
| 2070 | Returns TRUE on success, FALSE on error. |
| 2071 | */ |
| 2072 | inline my_bool flush_write_buffer_if_file_backed(IO_CACHE *info) |
| 2073 | { |
| 2074 | my_bool ret= 0; |
| 2075 | DBUG_ENTER("binlog_flush_cache_log_to_disk"); |
| 2076 | DBUG_ASSERT(info); |
| 2077 | DBUG_ASSERT(!info->error); |
| 2078 | DBUG_EXECUTE_IF("simulate_binlog_tmp_file_no_space_left_on_flush", |
| 2079 | { DBUG_SET("+d,simulate_file_write_error"); }); |
| 2080 | ret= info->pos_in_file && flush_io_cache(info); |
| 2081 | DBUG_EXECUTE_IF("simulate_binlog_tmp_file_no_space_left_on_flush", |
| 2082 | { DBUG_SET("-d,simulate_file_write_error"); }); |
| 2083 | DBUG_RETURN(ret); |
| 2084 | } |
| 2085 | |
| 2086 | /* |
| 2087 | This function flushes a cache upon commit/rollback. |
no outgoing calls
no test coverage detected