summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Petrunia <sergey@mariadb.com>2023-05-16 11:04:48 +0300
committerSergei Petrunia <sergey@mariadb.com>2023-05-16 11:04:48 +0300
commite22ddd2cbeddce71d09b49768578e8532f30576c (patch)
treed2b49f9d097cf60aa33cfa523d44ca06abd6f807
parent903358eab7bdff4337337f409f413b0aff4be056 (diff)
downloadmariadb-git-e22ddd2cbeddce71d09b49768578e8532f30576c.tar.gz
Fix UBSAN failure: sql_select.h:982:7: load of value ... not valid for type bool
This is 11.0 part of the fix: in 11.0, get_costs_for_tables() calls best_access_path() for all possible tables, for each call it saves a POSITION object with the access method and "loose_scan_pos" POSITION object. The latter is saved even if there is no possible LooseScan plan. Saving is done by copying POSITION objects which may generate a spurious UBSan error.
-rw-r--r--sql/sql_select.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 32577b9306a..9193b40702b 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -447,6 +447,7 @@ POSITION::POSITION()
key= 0;
forced_index= 0;
use_join_buffer= 0;
+ firstmatch_with_join_buf= false;
sj_strategy= SJ_OPT_NONE;
n_sj_tables= 0;
spl_plan= 0;