Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4
Description
While investigating MDEV-33533, I noticed that the function ha_innobase::rnd_pos() is duplicating a ut_a() assertion is also at the start of the invoked function ha_innobase::index_next(). For checking the assertion condition, two non-inlined function calls are needed. I think that we should enable this assertion only in debug builds, and retain it in a few places only, such as ha_innobase::change_active_index(). There are also other occurrences of this assertion:
@@ -9179,7 +9179,7 @@ void
|
ha_innobase::try_semi_consistent_read(bool yes)
|
/*===========================================*/
|
{
|
- ut_a(m_prebuilt->trx == thd_to_trx(ha_thd()));
|
+ DBUG_ASSERT(m_prebuilt->trx == thd_to_trx(ha_thd()));
|
|
/* Row read type is set to semi consistent read if this was
|
requested by the MySQL and either innodb_locks_unsafe_for_binlog
|
@@ -9349,8 +9349,7 @@ ha_innobase::index_read(
|
DBUG_ENTER("index_read");
|
DEBUG_SYNC_C("ha_innobase_index_read_begin");
|
|
- ut_a(m_prebuilt->trx == thd_to_trx(m_user_thd));
|
- ut_ad(key_len != 0 || find_flag != HA_READ_KEY_EXACT);
|
+ DBUG_ASSERT(m_prebuilt->trx == thd_to_trx(m_user_thd));
|
|
dict_index_t* index = m_prebuilt->index;
|
|
Furthermore, the function ha_innobase::index_read() is executing two sets of tests on find_flag, while one switch (find_flag) could perform the same more efficiently. There is also some duplicated code at the end of the function, for the error handling of row_search_mvcc().
Attachments
Issue Links
- relates to
-
MDEV-33533 Crash at execution of DELETE when trying to use rowid filter
- Closed