From 24e2d30fa0a3a5544409dff520e47a40fefd6b6e Mon Sep 17 00:00:00 2001 From: Ben Thul Date: Wed, 13 Aug 2025 18:22:32 -0700 Subject: [PATCH] Be more liberal in allowing for index merges --- MYSQL_VERSION | 2 +- sql/join_optimizer/join_optimizer.cc | 6 +++--- storage/innobase/include/univ.i | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MYSQL_VERSION b/MYSQL_VERSION index 40861d83ac60..e0e41daffef0 100644 --- a/MYSQL_VERSION +++ b/MYSQL_VERSION @@ -1,5 +1,5 @@ MYSQL_VERSION_MAJOR=8 MYSQL_VERSION_MINOR=4 MYSQL_VERSION_PATCH=5 -MYSQL_VERSION_EXTRA=-5 +MYSQL_VERSION_EXTRA=-501 MYSQL_VERSION_MATURITY="LTS" diff --git a/sql/join_optimizer/join_optimizer.cc b/sql/join_optimizer/join_optimizer.cc index a2d907b674e7..b3a10dc25ce4 100644 --- a/sql/join_optimizer/join_optimizer.cc +++ b/sql/join_optimizer/join_optimizer.cc @@ -1496,14 +1496,14 @@ bool CostingReceiver::FindIndexRangeScans( // case that creates multiple candidates). ANDs in index merges are pretty // much always handled nonexactly (see the comment on PossibleIndexMerge), // ie., we pick one part of the conjunction and have to check the other - // by filter. Verify that the ANDing marked the tree as inexact. - assert(merge.inexact || new_tree->merges.size() == 1); + // by filter. So we need to note here that this has happened. + merge.inexact |= (new_tree->merges.size() > 1); // Similarly, if there is also range scan arising from this predicate // (again because of an AND inside an OR), we need to handle the index // merge nonexactly, as the index merge will need to have the range // predicate in a filter on top of it. - assert(merge.inexact || new_tree->keys_map.is_clear_all()); + merge.inexact |= !new_tree->keys_map.is_clear_all(); index_merges.push_back(merge); } diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index 87429b6c0b10..b0e754b054bd 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -56,7 +56,7 @@ this program; if not, write to the Free Software Foundation, Inc., #define INNODB_VERSION_BUGFIX MYSQL_VERSION_PATCH #ifndef PERCONA_INNODB_VERSION -#define PERCONA_INNODB_VERSION 5 +#define PERCONA_INNODB_VERSION 501 #endif /* The following is the InnoDB version as shown in