From e778793be3f7c2ca31cfb37eb3a89fe2851c39a2 Mon Sep 17 00:00:00 2001 From: Nikita Malyavin Date: Mon, 13 Dec 2021 12:04:59 +0300 Subject: fix windows build --- sql/log.cc | 9 +++++---- sql/log.h | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sql/log.cc b/sql/log.cc index 32a8eb0aee9..26588acd4d1 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -3637,15 +3637,16 @@ bool Event_log::open(const char *log_name, if (error) return error; - int bytes_written= write_description_event( + longlong bytes_written= write_description_event( (enum_binlog_checksum_alg)binlog_checksum_options, encrypt_binlog, false); error= bytes_written < 0; return error; } -int Event_log::write_description_event(enum_binlog_checksum_alg checksum_alg, - bool encrypt, bool dont_set_created) +longlong +Event_log::write_description_event(enum_binlog_checksum_alg checksum_alg, + bool encrypt, bool dont_set_created) { Format_description_log_event s(BINLOG_VERSION); /* @@ -3688,7 +3689,7 @@ int Event_log::write_description_event(enum_binlog_checksum_alg checksum_alg, return -1; } } - return s.data_written; + return (longlong)s.data_written; } diff --git a/sql/log.h b/sql/log.h index c69b8bda2f2..b92be3a6149 100644 --- a/sql/log.h +++ b/sql/log.h @@ -426,8 +426,8 @@ public: enum cache_type io_cache_type_arg); virtual IO_CACHE *get_log_file() { return &log_file; } - int write_description_event(enum_binlog_checksum_alg checksum_alg, - bool encrypt, bool dont_set_created); + longlong write_description_event(enum_binlog_checksum_alg checksum_alg, + bool encrypt, bool dont_set_created); bool write_event(Log_event *ev, binlog_cache_data *data, IO_CACHE *file); }; -- cgit v1.2.1