iff --git a/sql/sql_resolver.cc b/sql/sql_resolver.cc index 94153f7..c78b209 100644 --- a/sql/sql_resolver.cc +++ b/sql/sql_resolver.cc @@ -7150,6 +7150,12 @@ bool Query_block::transform_subquery_to_derived( materialized_derived_table_count++; derived_table_count++; + if (opt_hints_qb && // QB hints initialized + !tl->opt_hints_table) // Table hints are not adjusted yet + { + tl->opt_hints_table = opt_hints_qb->adjust_table_hints(tl); + } + Lifted_fields_map lifted_where_fields; bool added_cardinality_check = false; if (lifted_where_cond != nullptr) {