Skip to content

Conversation

@laurynas-biveinis
Copy link
Contributor

@laurynas-biveinis laurynas-biveinis commented May 18, 2023

Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

  • ha_rocksdb::create_key_defs had non-null attribute for the 2nd and 3rd
    argument. It seems that the attribute non-null arg indexes got desynced,
    because the 3rd argument is a reference, and by usage the 1st and the 2nd args
    are pointers that cannot be nullptr. Instead of fixing the attribute indexes,
    convert pointers to references, which cannot be null by design.
  • Do the same for ha_rocksdb::create_cfs. At the same time make tbl_def_arg
    const, which previously was not, and make the function return bool, as it only
    returns two values for success and error. Convert it from
    DBUG_ENTER_FUNC/DBUG_RETURN to a newer (and lighter) DBUG_TRACE.
  • ha_rocksdb::create_table made private, pointer args converted to reference
    args.
  • Added missing error checking for RocksDB WriteBatch::SingleDelete calls
  • ha_rocksdb::has_hidden_pk made static, args changed from pointers to
    references, removed redundant nonnull attribute.
  • ha_rocksdb::pk_index args changed from pointers to references, removed
    redundant nonnull attribute.
  • ha_rocksdb::set_last_rowkey argument was marked unused even though it was used
  • ha_rocksdb::check_and_lock_sk, ha_rocksdb::check_uniqueness_and_lock,
    ha_rocksdb::update_write_row, ha_rocksdb::reset,
    ha_rocksdb::calc_updated_indexes: added asserts for relationships between
    arguments and table->record[0]/table->record[1]
  • ha_rocksdb::adjust_handler_stats_sst_and_memtable: reduce scope of two local
    vars
  • Rdb_key_def: introduce invalid index ID constant based on
    dd::INVALID_OBJECT_ID. Check it on construction and in the index ID getter.
    Replace direct field accesses with the getter call.
  • Rdb_key_def::table_has_hidden_pk arg changed from pointer to reference.
  • Replace warn_unused_result attribute with the standard [[nodiscard]] for all
    the touched signatures.

@facebook-github-bot
Copy link

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

@laurynas-biveinis has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

row_info.tx->get_indexed_write_batch(m_tbl_def->get_table_type())
->SingleDelete(kd.get_cf(), old_key_slice);
if (!s.ok()) {
return rdb_error_to_mysql(s);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: in ha_rocksdb::delete_row(), if SD or delete fail, it will call tx->set_status_error() instead of rdb_error_to_mysql(). Although these two function are similar, maybe we should have same behavior?

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- ha_rocksdb::create_key_defs had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be nullptr. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for ha_rocksdb::create_cfs. At the same time make tbl_def_arg
  const, which previously was not, and make the function return bool, as it only
  returns two values for success and error. Convert it from
  DBUG_ENTER_FUNC/DBUG_RETURN to a newer (and lighter) DBUG_TRACE.
- ha_rocksdb::create_table made private, pointer args converted to reference
  args.
- Added missing error checking for RocksDB WriteBatch::SingleDelete calls
- ha_rocksdb::has_hidden_pk made static, args changed from pointers to
  references, removed redundant nonnull attribute, GCC-style attribute replaced
  with a standard C++ one.
- ha_rocksdb::pk_index args changed from pointers to references, removed
  redundant nonnull attribute.
- ha_rocksdb::set_last_rowkey argument was marked unused even though it was used
- ha_rocksdb::check_and_lock_sk, ha_rocksdb::check_uniqueness_and_lock,
  ha_rocksdb::update_write_row, ha_rocksdb::reset,
  ha_rocksdb::calc_updated_indexes: added asserts for relationships between
  arguments and table->record[0]/table->record[1]
- ha_rocksdb::adjust_handler_stats_sst_and_memtable: reduce scope of two local
  vars
- Rdb_key_def: introduce invalid index ID constant based on
  dd::INVALID_OBJECT_ID. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- Rdb_key_def::table_has_hidden_pk arg changed from pointer to reference.
- Replace warn_unused_result attribute with the standard `[[nodiscard]]` for all
  the touched signatures.
@laurynas-biveinis laurynas-biveinis force-pushed the myr-create_key_defs-fix branch from a00447b to d275f0f Compare June 1, 2023 09:03
@facebook-github-bot
Copy link

@laurynas-biveinis has updated the pull request. You must reimport the pull request before landing.

@laurynas-biveinis
Copy link
Contributor Author

Updated, ready for review

@facebook-github-bot
Copy link

@laurynas-biveinis has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

2 similar comments
@facebook-github-bot
Copy link

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@luqun
Copy link
Contributor

luqun commented Jun 2, 2023

still waiting for test result and will update when it is done.

@facebook-github-bot
Copy link

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

@bigfootjon has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

row_info.tx->get_indexed_write_batch(m_tbl_def->get_table_type())
->SingleDelete(kd.get_cf(), old_key_slice);
if (!s.ok()) {
return rdb_error_to_mysql(s);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe also change this from rdb_error_to_mysql to row_info.tx->set_status_error().

facebook-github-bot pushed a commit that referenced this pull request Jun 9, 2023
Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: #1311

Differential Revision: D46075453

fbshipit-source-id: 5965df2
@laurynas-biveinis laurynas-biveinis deleted the myr-create_key_defs-fix branch June 12, 2023 08:32
luqun pushed a commit to luqun/mysql-5.6 that referenced this pull request Jun 12, 2023
…ness

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook#1311
GitHub Author: Laurynas Biveinis <laurynas.biveinis@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.

Reviewers: herman, chni, #mysql_eng

Reviewed By: herman

Subscribers: herman, webscalesql-eng@fb.com

Differential Revision: https://phabricator.intern.facebook.com/D46075453

Tags: accept2ship
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 14, 2023
)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df2
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 19, 2023
)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df2
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 23, 2023
)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df2
hermanlee pushed a commit to hermanlee/mysql-5.6 that referenced this pull request Oct 3, 2023
)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook#1311

Differential Revision: D46075453
hermanlee pushed a commit to hermanlee/mysql-5.6 that referenced this pull request Oct 18, 2023
)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook#1311

Differential Revision: D46075453
inikep pushed a commit to inikep/percona-server that referenced this pull request Dec 20, 2023
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Jan 29, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 15, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 16, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 16, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 16, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
percona-ysorokin pushed a commit to percona-ysorokin/percona-server that referenced this pull request Apr 18, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Apr 28, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Apr 30, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request May 4, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request May 4, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
inikep pushed a commit to inikep/percona-server that referenced this pull request Jun 5, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
inikep pushed a commit to inikep/percona-server that referenced this pull request Jun 5, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
inikep pushed a commit to inikep/percona-server that referenced this pull request Jun 5, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Jul 31, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
percona-ysorokin pushed a commit to percona-ysorokin/percona-server that referenced this pull request Jul 31, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Jul 31, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
inikep pushed a commit to inikep/percona-server that referenced this pull request Jul 31, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
inikep pushed a commit to inikep/percona-server that referenced this pull request Jul 31, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
percona-ysorokin pushed a commit to percona-ysorokin/percona-server that referenced this pull request Aug 2, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Aug 5, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
inikep pushed a commit to inikep/percona-server that referenced this pull request Oct 22, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
inikep pushed a commit to inikep/percona-server that referenced this pull request Oct 27, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
dlenev pushed a commit to dlenev/percona-server that referenced this pull request Oct 30, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 4, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 4, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 5, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 5, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 6, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
dlenev pushed a commit to dlenev/percona-server that referenced this pull request Nov 7, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 11, 2025
Upstream commit ID: facebook/mysql-5.6@63b8aae
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
Various minor cleanups

All done or noticed in the native DD prototype work, are independent from it,
and will help to reduce its diff.

- `ha_rocksdb::create_key_defs` had non-null attribute for the 2nd and 3rd
  argument. It seems that the attribute non-null arg indexes got desynced,
  because the 3rd argument is a reference, and by usage the 1st and the 2nd args
  are pointers that cannot be `nullptr`. Instead of fixing the attribute indexes,
  convert pointers to references, which cannot be null by design.
- Do the same for `ha_rocksdb::create_cfs`. At the same time make `tbl_def_arg`
  `const`, which previously was not, and make the function return `bool`, as it only
  returns two values for success and error. Convert it from
  `DBUG_ENTER_FUNC`/`DBUG_RETURN` to a newer (and lighter) `DBUG_TRACE`.
- `ha_rocksdb::create_table` made `private`, pointer args converted to reference
  args.
- Added missing error checking for RocksDB `WriteBatch::SingleDelete` calls
- `ha_rocksdb::has_hidden_pk` made `static`, args changed from pointers to
  references, removed redundant `nonnull` attribute.
- `ha_rocksdb::pk_index` args changed from pointers to references, removed
  redundant `nonnull` attribute.
- `ha_rocksdb::set_last_rowkey` argument was marked unused even though it was used
- `ha_rocksdb::check_and_lock_sk`, `ha_rocksdb::check_uniqueness_and_lock`,
  `ha_rocksdb::update_write_row`, `ha_rocksdb::reset`,
  `ha_rocksdb::calc_updated_indexes`: added asserts for relationships between
  arguments and `table->record[0]`/`table->record[1]`
- `ha_rocksdb::adjust_handler_stats_sst_and_memtable`: reduce scope of two local
  vars
- `Rdb_key_def`: introduce invalid index ID constant based on
  `dd::INVALID_OBJECT_ID`. Check it on construction and in the index ID getter.
  Replace direct field accesses with the getter call.
- `Rdb_key_def::table_has_hidden_pk` arg changed from pointer to reference.
- Replace `warn_unused_result` attribute with the standard `[[nodiscard]]` for all
  the touched signatures.

Pull Request resolved: facebook/mysql-5.6#1311

Differential Revision: D46075453

fbshipit-source-id: 5965df275a5a7371a015ebc0d5ac1ab59dc47a64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants