mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MariaRocks port: fix rocksdb.handler_basic test
MySQL has each storage engine to increment Handler_XXX counters, while MariaDB has handler::ha_XXX() methods to do the increments. MariaDB's solution doesn't work for storage engines that implement handler::read_range_first(), though. Make ha_rocksdb::read_range_first increment the counter (when it is calling handler::ha_XXX() function that will)
This commit is contained in:
@ -3928,10 +3928,16 @@ private:
|
||||
void mark_trx_read_write_internal();
|
||||
bool check_table_binlog_row_based_internal(bool binlog_row);
|
||||
|
||||
/* Private helpers */
|
||||
protected:
|
||||
/*
|
||||
These are intended to be used only by handler::ha_xxxx() functions
|
||||
However, engines that implement read_range_XXX() (like MariaRocks)
|
||||
or embed other engines (like ha_partition) may need to call these also
|
||||
*/
|
||||
inline void increment_statistics(ulong SSV::*offset) const;
|
||||
inline void decrement_statistics(ulong SSV::*offset) const;
|
||||
|
||||
private:
|
||||
/*
|
||||
Low-level primitives for storage engines. These should be
|
||||
overridden by the storage engine class. To call these methods, use
|
||||
|
@ -6265,6 +6265,7 @@ int ha_rocksdb::read_range_first(const key_range *start_key,
|
||||
DBUG_RETURN(HA_ERR_LOCK_DEADLOCK);
|
||||
}
|
||||
#endif
|
||||
increment_statistics(&SSV::ha_read_key_count);
|
||||
|
||||
MYSQL_TABLE_IO_WAIT(m_psi, PSI_TABLE_FETCH_ROW, active_index, 0,
|
||||
{ result= index_read_map_impl(table->record[0],
|
||||
|
Reference in New Issue
Block a user