Skip to content

Commit

Permalink
MDEV-34705: Binlog-in-engine: Buildbot fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
  • Loading branch information
knielsen committed Jan 17, 2025
1 parent c60bea9 commit 2ef2e33
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
10 changes: 10 additions & 0 deletions mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_DIRECTORY
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Directory path (absolute or relative to datadir) where binlog files are stored. If this is used, must not specify a directory path for --log-bin
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_DIRECT_NON_TRANSACTIONAL_UPDATES
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
Expand Down
10 changes: 5 additions & 5 deletions storage/innobase/fsp/fsp_binlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fsp_binlog_tablespace_close(uint64_t file_no)
mtr_t mtr;
dberr_t res;

uint32_t space_id= SRV_SPACE_ID_BINLOG0 + (file_no & 1);
uint32_t space_id= SRV_SPACE_ID_BINLOG0 + (uint32_t)(file_no & 1);
mysql_mutex_lock(&fil_system.mutex);
fil_space_t *space= fil_space_get_by_id(space_id);
mysql_mutex_unlock(&fil_system.mutex);
Expand Down Expand Up @@ -200,7 +200,7 @@ fsp_binlog_open(const char *file_name, pfs_os_file_t fh,
return nullptr;
}

uint32_t space_id= SRV_SPACE_ID_BINLOG0 + (file_no & 1);
uint32_t space_id= SRV_SPACE_ID_BINLOG0 + (uint32_t)(file_no & 1);

if (!open_empty) {
page_t *page_buf= static_cast<byte*>(aligned_malloc(page_size, page_size));
Expand Down Expand Up @@ -306,7 +306,7 @@ dberr_t fsp_binlog_tablespace_create(uint64_t file_no, fil_space_t **new_space)

mysql_mutex_lock(&fil_system.mutex);
/* ToDo: Need to ensure file (N-2) is no longer active before creating (N). */
uint32_t space_id= SRV_SPACE_ID_BINLOG0 + (file_no & 1);
uint32_t space_id= SRV_SPACE_ID_BINLOG0 + (uint32_t)(file_no & 1);
if (!(*new_space= fil_space_t::create(space_id,
( FSP_FLAGS_FCRC32_MASK_MARKER |
FSP_FLAGS_FCRC32_PAGE_SSIZE()),
Expand Down Expand Up @@ -564,7 +564,7 @@ bool
fsp_binlog_flush()
{
uint64_t file_no= active_binlog_file_no.load(std::memory_order_relaxed);
uint32_t space_id= SRV_SPACE_ID_BINLOG0 + (file_no & 1);
uint32_t space_id= SRV_SPACE_ID_BINLOG0 + (uint32_t)(file_no & 1);
uint32_t page_no= binlog_cur_page_no;
fil_space_t *space= active_binlog_space;
chunk_data_flush dummy_data;
Expand Down Expand Up @@ -670,7 +670,7 @@ binlog_chunk_reader::fetch_current_page()
case.
*/
buf_block_t *hint_block= nullptr;
uint32_t space_id= SRV_SPACE_ID_BINLOG0 + (s.file_no & 1);
uint32_t space_id= SRV_SPACE_ID_BINLOG0 + (uint32_t)(s.file_no & 1);
dberr_t err= DB_SUCCESS;
block= buf_page_get_gen(page_id_t{space_id, s.page_no}, 0,
RW_S_LATCH, hint_block, BUF_GET_IF_IN_POOL,
Expand Down
4 changes: 3 additions & 1 deletion storage/innobase/include/fsp_binlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ static constexpr uint64_t ALLOWED_NESTED_RECORDS=
((uint64_t)1 << FSP_BINLOG_TYPE_DUMMY)
;
/* Ensure that all types fit in the ALLOWED_NESTED_RECORDS bitmask. */
static_assert(FSP_BINLOG_TYPE_END <= 8*sizeof(ALLOWED_NESTED_RECORDS));
static_assert(FSP_BINLOG_TYPE_END <= 8*sizeof(ALLOWED_NESTED_RECORDS),
"Binlog types must be <64 to fit "
"in ALLOWED_NESTED_RECORDS bitmask");


class binlog_chunk_reader {
Expand Down

0 comments on commit 2ef2e33

Please sign in to comment.