Skip to content

Commit

Permalink
fix compile error for uint64_t
Browse files Browse the repository at this point in the history
fbshipit-source-id: 16216a7411a
  • Loading branch information
mdcallag authored and inikep committed Sep 1, 2021
1 parent 67df050 commit b2dab24
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion storage/rocksdb/ha_rocksdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <inttypes.h>

void dbug_dump_database(rocksdb::DB *db);
static handler *rocksdb_create_handler(handlerton *hton,
TABLE_SHARE *table,
Expand Down Expand Up @@ -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));
Expand Down
8 changes: 7 additions & 1 deletion storage/rocksdb/rdb_cf_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <inttypes.h>

void Column_family_manager::init(std::vector<std::string> *names,
std::vector<rocksdb::ColumnFamilyHandle*> *handles)
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit b2dab24

Please sign in to comment.