-
Notifications
You must be signed in to change notification settings - Fork 713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup non-null pointer args, increase const correctness #1311
Cleanup non-null pointer args, increase const correctness #1311
Conversation
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@laurynas-biveinis has updated the pull request. You must reimport the pull request before landing. |
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
storage/rocksdb/ha_rocksdb.cc
Outdated
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); |
There was a problem hiding this comment.
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.
a00447b
to
d275f0f
Compare
@laurynas-biveinis has updated the pull request. You must reimport the pull request before landing. |
Updated, ready for review |
@laurynas-biveinis has updated the pull request. You must reimport the pull request before landing. |
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
2 similar comments
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
still waiting for test result and will update when it is done. |
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@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); |
There was a problem hiding this comment.
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().
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
…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 <[email protected]> Test Plan: Imported from GitHub, without a `Test Plan:` line. Reviewers: herman, chni, #mysql_eng Reviewed By: herman Subscribers: herman, [email protected] Differential Revision: https://phabricator.intern.facebook.com/D46075453 Tags: accept2ship
) 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
) 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
) 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
) 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
) 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
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
) 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
) 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
) 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
) 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
) 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
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
) 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
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
) 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
) 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
) 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 3rdargument. 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.
ha_rocksdb::create_cfs
. At the same time maketbl_def_arg
const
, which previously was not, and make the function returnbool
, as it onlyreturns 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
madeprivate
, pointer args converted to referenceargs.
WriteBatch::SingleDelete
callsha_rocksdb::has_hidden_pk
madestatic
, args changed from pointers toreferences, removed redundant
nonnull
attribute.ha_rocksdb::pk_index
args changed from pointers to references, removedredundant
nonnull
attribute.ha_rocksdb::set_last_rowkey
argument was marked unused even though it was usedha_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 betweenarguments and
table->record[0]
/table->record[1]
ha_rocksdb::adjust_handler_stats_sst_and_memtable
: reduce scope of two localvars
Rdb_key_def
: introduce invalid index ID constant based ondd::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.warn_unused_result
attribute with the standard[[nodiscard]]
for allthe touched signatures.