Commit 93d3a39b authored by Sergei Petrunia's avatar Sergei Petrunia

MariaRocks port: fix rocksdb.rocksdb_row_stats test

Make rocksdb_rows_XXX counters to work
parent ebbe59fa
...@@ -95,7 +95,6 @@ namespace myrocks { ...@@ -95,7 +95,6 @@ namespace myrocks {
static st_global_stats global_stats; static st_global_stats global_stats;
static st_export_stats export_stats; static st_export_stats export_stats;
#ifdef MARIAROCKS_NOT_YET
/** /**
Updates row counters based on the table type and operation type. Updates row counters based on the table type and operation type.
*/ */
...@@ -107,7 +106,6 @@ void ha_rocksdb::update_row_stats(const operation_type &type) { ...@@ -107,7 +106,6 @@ void ha_rocksdb::update_row_stats(const operation_type &type) {
else else
global_stats.rows[type].inc(); global_stats.rows[type].inc();
} }
#endif
void dbug_dump_database(rocksdb::DB *db); void dbug_dump_database(rocksdb::DB *db);
static handler *rocksdb_create_handler(my_core::handlerton *hton, static handler *rocksdb_create_handler(my_core::handlerton *hton,
...@@ -6451,8 +6449,8 @@ int ha_rocksdb::secondary_index_read(const int keyno, uchar* const buf) ...@@ -6451,8 +6449,8 @@ int ha_rocksdb::secondary_index_read(const int keyno, uchar* const buf)
#ifdef MARIAROCKS_NOT_YET #ifdef MARIAROCKS_NOT_YET
stats.rows_read++; stats.rows_read++;
stats.rows_index_next++; stats.rows_index_next++;
update_row_stats(ROWS_READ);
#endif #endif
update_row_stats(ROWS_READ);
} }
return rc; return rc;
} }
...@@ -6600,8 +6598,8 @@ int ha_rocksdb::index_read_map_impl(uchar* const buf, const uchar* const key, ...@@ -6600,8 +6598,8 @@ int ha_rocksdb::index_read_map_impl(uchar* const buf, const uchar* const key,
#ifdef MARIAROCKS_NOT_YET #ifdef MARIAROCKS_NOT_YET
stats.rows_read++; stats.rows_read++;
stats.rows_index_first++; stats.rows_index_first++;
update_row_stats(ROWS_READ);
#endif #endif
update_row_stats(ROWS_READ);
} }
DBUG_RETURN(rc); DBUG_RETURN(rc);
} }
...@@ -6729,8 +6727,8 @@ int ha_rocksdb::index_read_map_impl(uchar* const buf, const uchar* const key, ...@@ -6729,8 +6727,8 @@ int ha_rocksdb::index_read_map_impl(uchar* const buf, const uchar* const key,
#ifdef MARIAROCKS_NOT_YET #ifdef MARIAROCKS_NOT_YET
stats.rows_read++; stats.rows_read++;
stats.rows_index_first++; stats.rows_index_first++;
update_row_stats(ROWS_READ);
#endif #endif
update_row_stats(ROWS_READ);
} }
DBUG_RETURN(rc); DBUG_RETURN(rc);
} }
...@@ -7632,8 +7630,8 @@ int ha_rocksdb::write_row(uchar* const buf) ...@@ -7632,8 +7630,8 @@ int ha_rocksdb::write_row(uchar* const buf)
{ {
#ifdef MARIAROCKS_NOT_YET #ifdef MARIAROCKS_NOT_YET
stats.rows_inserted++; stats.rows_inserted++;
update_row_stats(ROWS_INSERTED);
#endif #endif
update_row_stats(ROWS_INSERTED);
} }
DBUG_RETURN(rv); DBUG_RETURN(rv);
} }
...@@ -8545,8 +8543,8 @@ int ha_rocksdb::rnd_next_with_direction(uchar* const buf, bool move_forward) ...@@ -8545,8 +8543,8 @@ int ha_rocksdb::rnd_next_with_direction(uchar* const buf, bool move_forward)
#ifdef MARIAROCKS_NOT_YET #ifdef MARIAROCKS_NOT_YET
stats.rows_read++; stats.rows_read++;
stats.rows_index_next++; stats.rows_index_next++;
update_row_stats(ROWS_READ);
#endif #endif
update_row_stats(ROWS_READ);
} }
DBUG_RETURN(rc); DBUG_RETURN(rc);
...@@ -8662,8 +8660,8 @@ int ha_rocksdb::delete_row(const uchar* const buf) ...@@ -8662,8 +8660,8 @@ int ha_rocksdb::delete_row(const uchar* const buf)
} }
#ifdef MARIAROCKS_NOT_YET #ifdef MARIAROCKS_NOT_YET
stats.rows_deleted++; stats.rows_deleted++;
update_row_stats(ROWS_DELETED);
#endif #endif
update_row_stats(ROWS_DELETED);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -8882,8 +8880,8 @@ int ha_rocksdb::rnd_pos(uchar* const buf, uchar* const pos) ...@@ -8882,8 +8880,8 @@ int ha_rocksdb::rnd_pos(uchar* const buf, uchar* const pos)
{ {
#ifdef MARIAROCKS_NOT_YET #ifdef MARIAROCKS_NOT_YET
stats.rows_read++; stats.rows_read++;
update_row_stats(ROWS_READ);
#endif #endif
update_row_stats(ROWS_READ);
} }
DBUG_RETURN(rc); DBUG_RETURN(rc);
...@@ -8946,8 +8944,8 @@ int ha_rocksdb::update_row(const uchar* const old_data, uchar* const new_data) ...@@ -8946,8 +8944,8 @@ int ha_rocksdb::update_row(const uchar* const old_data, uchar* const new_data)
{ {
#ifdef MARIAROCKS_NOT_YET #ifdef MARIAROCKS_NOT_YET
stats.rows_updated++; stats.rows_updated++;
update_row_stats(ROWS_UPDATED);
#endif #endif
update_row_stats(ROWS_UPDATED);
} }
DBUG_RETURN(rv); DBUG_RETURN(rv);
} }
......
...@@ -510,9 +510,9 @@ class ha_rocksdb: public my_core::handler ...@@ -510,9 +510,9 @@ class ha_rocksdb: public my_core::handler
__attribute__((__nonnull__, __warn_unused_result__)); __attribute__((__nonnull__, __warn_unused_result__));
bool has_hidden_pk(const TABLE* const table) const bool has_hidden_pk(const TABLE* const table) const
__attribute__((__nonnull__, __warn_unused_result__)); __attribute__((__nonnull__, __warn_unused_result__));
#ifdef MARIAROCKS_NOT_YET
void update_row_stats(const operation_type &type); void update_row_stats(const operation_type &type);
#endif
void set_last_rowkey(const uchar* const old_data); void set_last_rowkey(const uchar* const old_data);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment