Skip to content

Commit ea15bf0

Browse files
laurynas-biveinisinikep
authored andcommitted
Use PRIu64 instead of %lu to format std::uint64_t values (percona#1261)
Upstream commit ID: facebook/mysql-5.6@65f8d20 PS-8755: Merge percona-202301 (https://jira.percona.com/browse/PS-8755) Summary: This fixes the macOS build, where std::uint64_t is unsigned long long. Pull Request resolved: facebook/mysql-5.6#1261 Reviewed By: sunshine-Chun Differential Revision: D42850107 Pulled By: hermanlee fbshipit-source-id: 7520d90efc4369e203d0c4ee6f52ab02863ca10d
1 parent f76f964 commit ea15bf0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

storage/rocksdb/rdb_index_merge.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ int Rdb_index_merge::add(const rocksdb::Slice &key, const rocksdb::Slice &val) {
163163
add is too large for the buffer.
164164
*/
165165
if (m_offset_tree.empty()) {
166-
LogPluginErrMsg(ERROR_LEVEL, 0,
167-
"Current value of rocksdb_merge_buf_size=%llu is too "
168-
"small. At least %u bytes required.",
166+
LogPluginErrMsg(ERROR_LEVEL, ER_LOG_PRINTF_MSG,
167+
"Current value of rocksdb_merge_buf_size=%" PRIu64
168+
" is too small. At least %u bytes required.",
169169
m_rec_buf_unsorted->m_total_size, total_offset);
170170
return HA_ERR_ROCKSDB_MERGE_FILE_ERR;
171171
}
@@ -181,9 +181,9 @@ int Rdb_index_merge::add(const rocksdb::Slice &key, const rocksdb::Slice &val) {
181181
const uint data_size = RDB_MERGE_CHUNK_LEN + RDB_MERGE_KEY_DELIMITER +
182182
RDB_MERGE_VAL_DELIMITER + key.size() + val.size();
183183
if (data_size > m_rec_buf_unsorted->m_total_size) {
184-
LogPluginErrMsg(ERROR_LEVEL, 0,
185-
"Current value of rocksdb_merge_buf_size=%llu is too "
186-
"small. At least %u bytes required.",
184+
LogPluginErrMsg(ERROR_LEVEL, ER_LOG_PRINTF_MSG,
185+
"Current value of rocksdb_merge_buf_size=%" PRIu64
186+
" is too small. At least %u bytes required.",
187187
m_rec_buf_unsorted->m_total_size, data_size);
188188
return HA_ERR_ROCKSDB_MERGE_FILE_ERR;
189189
}

storage/rocksdb/rdb_index_merge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Rdb_index_merge {
6262
ulonglong m_curr_offset; /* offset of the record pointer for the block */
6363
ulonglong m_disk_start_offset; /* where the chunk starts on disk */
6464
ulonglong m_disk_curr_offset; /* current offset on disk */
65-
ulonglong m_total_size; /* total # of data bytes in chunk */
65+
uint64 m_total_size; /* total # of data bytes in chunk */
6666

6767
void store_key_value(const rocksdb::Slice &key, const rocksdb::Slice &val)
6868
MY_ATTRIBUTE((__nonnull__));

0 commit comments

Comments
 (0)