summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2023-04-24 12:43:47 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2023-04-24 12:43:47 +0200
commit1d74927c58cea438c135a95886a9224405819a96 (patch)
tree197d4d1b6733566d23fe016a4dd71850ddf96db0 /sql/opt_range.cc
parentc6e58a8d173b7e9689952d07678ba79702ba8021 (diff)
parentd3e394b3b1ff1e2c4e160972aad1f78a13fbb62e (diff)
downloadmariadb-git-1d74927c58cea438c135a95886a9224405819a96.tar.gz
Merge branch '10.4' into 10.5
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 82b19e23fd4..7b6f373eea4 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -3554,7 +3554,10 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
}
else
{
+ enum_check_fields save_count_cuted_fields= thd->count_cuted_fields;
+ thd->count_cuted_fields= CHECK_FIELD_IGNORE;
rows= records_in_column_ranges(&param, idx, key);
+ thd->count_cuted_fields= save_count_cuted_fields;
if (rows != DBL_MAX)
{
key->field->cond_selectivity= rows/table_records;