Commit e459ce83 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-33779 InnoDB row operations could be faster

We have quite a few assertions
	ut_a(m_prebuilt->trx == thd_to_trx(ha_thd()));
in low-level functions.
These had better be debug assertions for performance reasons.
It should suffice to check that condition in the less frequently invoked
ha_innobase::change_active_index().

convert_search_mode_to_innobase(): Return whether the mode is
unsupported, and optionally update ha_innobase::m_last_match_mode.

ha_innobase::index_read(): Only branch on find_flag once, and
simplify the error handling after invoking row_search_mvcc().

ha_innobase::rnd_pos(): Remove an assertion that is duplicating one
in ha_innobase::index_read(), which we are calling unconditionally.

ha_innobase::records_in_range(): Check only once whether
min_key, max_key are null pointers.

row_sel_convert_mysql_key_to_innobase(): Declare all parameters
except the conversion buffer pointer (buf) to be nonnull.

Reviewed by: Debarun Banerjee
parent 829cb1a4
This diff is collapsed.
...@@ -115,8 +115,8 @@ row_sel_convert_mysql_key_to_innobase( ...@@ -115,8 +115,8 @@ row_sel_convert_mysql_key_to_innobase(
ulint buf_len, /*!< in: buffer length */ ulint buf_len, /*!< in: buffer length */
dict_index_t* index, /*!< in: index of the key value */ dict_index_t* index, /*!< in: index of the key value */
const byte* key_ptr, /*!< in: MySQL key value */ const byte* key_ptr, /*!< in: MySQL key value */
ulint key_len); /*!< in: MySQL key value length */ ulint key_len) /*!< in: MySQL key value length */
MY_ATTRIBUTE((nonnull(1,4,5)));
/** Search for rows in the database using cursor. /** Search for rows in the database using cursor.
Function is mainly used for tables that are shared across connections and Function is mainly used for tables that are shared across connections and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment