Skip to content

Commit

Permalink
Make members of class ha_rocksdb respect the code conventions
Browse files Browse the repository at this point in the history
Summary:
  Have class ha_rocksdb member names start with m_
  Introduce open table map class
  Add new function my_hash_const_element(), the const equivalent of my_hash_element()
  Rename ROCKSDB_SHARE into Rdb_table_handler

Test Plan:
  myqlbuild.sh --clean
  mysqltest.sh
  mysqltest.sh --testset=RocksDB
  myqlbuild.sh --clean --release

Reviewers: jkedgar

Reviewed By: jkedgar

Subscribers: webscalesql-eng

Projects: #webscalesql

Differential Revision: https://reviews.facebook.net/D58305
  • Loading branch information
Vasile Paraschiv committed May 20, 2016
1 parent 20cfe19 commit 7c869d3
Show file tree
Hide file tree
Showing 6 changed files with 361 additions and 207 deletions.
1 change: 1 addition & 0 deletions include/hash.h
Expand Up @@ -89,6 +89,7 @@ my_bool _my_hash_init(HASH *hash, uint growth_size, CHARSET_INFO *charset,
void my_hash_free(HASH *tree);
void my_hash_reset(HASH *hash);
uchar *my_hash_element(HASH *hash, ulong idx);
const uchar *my_hash_const_element(const HASH *hash, ulong idx);
uchar *my_hash_search(const HASH *info, const uchar *key, size_t length);
uchar *my_hash_search_using_hash_value(const HASH *info,
my_hash_value_type hash_value,
Expand Down
8 changes: 8 additions & 0 deletions mysys/hash.c
Expand Up @@ -717,6 +717,14 @@ uchar *my_hash_element(HASH *hash, ulong idx)
}


const uchar *my_hash_const_element(const HASH *hash, ulong idx)
{
if (idx < hash->records)
return dynamic_element(&hash->array,idx,const HASH_LINK*)->data;
return 0;
}


/*
Replace old row with new row. This should only be used when key
isn't changed
Expand Down
3 changes: 3 additions & 0 deletions storage/rocksdb/README
Expand Up @@ -25,6 +25,9 @@ Several refinements:
7. Given the 80 character per line limit, we'll not always use full English
words in names, when a well known or easily recognizable abbreviation
exists (like "tx" for "transaction" or "param" for "parameter" etc).
8. When needing to disambiguate, we use different suffixes for that, like
"_arg" for a function argument/parameter, "_arr" for a C style array, and
"_vect" for a std::vector etc.

== Running Tests ==
To run tests from rocksdb, rocksd_rpl or rocksdb_sys_vars packages, use the following parameters:
Expand Down

0 comments on commit 7c869d3

Please sign in to comment.