diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index e403d6900f64..1ce90425b672 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -36,6 +36,12 @@ #include "rocksdb/table.h" +/* This is here to get PRIu64, PRId64 */ +#ifndef __STDC_FORMAT_MACROS +#define __STDC_FORMAT_MACROS +#endif +#include + void dbug_dump_database(rocksdb::DB *db); static handler *rocksdb_create_handler(handlerton *hton, TABLE_SHARE *table, @@ -758,7 +764,7 @@ static int rocksdb_init_func(void *p) sql_print_information(" cf=%s", cf_names[i].c_str()); sql_print_information(" write_buffer_size=%ld", opts.write_buffer_size); - sql_print_information(" target_file_size_base=%d", + sql_print_information(" target_file_size_base=%" PRIu64, opts.target_file_size_base); cf_descr.push_back(rocksdb::ColumnFamilyDescriptor(cf_names[i], opts)); diff --git a/storage/rocksdb/rdb_cf_manager.cc b/storage/rocksdb/rdb_cf_manager.cc index f64fc2e8ec4a..d926b27ecbe1 100644 --- a/storage/rocksdb/rdb_cf_manager.cc +++ b/storage/rocksdb/rdb_cf_manager.cc @@ -24,6 +24,11 @@ #include "rdb_cf_manager.h" +/* This is here to get PRIu64, PRId64 */ +#ifndef __STDC_FORMAT_MACROS +#define __STDC_FORMAT_MACROS +#endif +#include void Column_family_manager::init(std::vector *names, std::vector *handles) @@ -107,7 +112,8 @@ Column_family_manager::get_or_create_cf(rocksdb::DB *rdb, const char *cf_name, sql_print_information("RocksDB: creating column family %s", cf_name_str.c_str()); sql_print_information(" write_buffer_size=%ld", opts.write_buffer_size); - sql_print_information(" target_file_size_base=%d", opts.target_file_size_base); + sql_print_information(" target_file_size_base=%" PRIu64, + opts.target_file_size_base); rocksdb::Status s= rdb->CreateColumnFamily(opts, cf_name_str, &cf_handle); if (s.ok())