summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2021-10-06 12:31:19 +0300
committerMonty <monty@mariadb.org>2022-07-07 18:52:36 +0300
commitd0b403d238190ec00c1953001584daa4dc04a431 (patch)
treee156f58a25cdc39da02c39376518861d0bdb8ad2 /sql/sql_lex.cc
parentfaa3531d87d0104a902ac315d6bf62ec40dfe99a (diff)
downloadmariadb-git-d0b403d238190ec00c1953001584daa4dc04a431.tar.gz
Optimizer code cleanups, no logic changes
- Updated comments - Added some extra DEBUG - Indentation changes and break long lines - Trivial code changes like: - Combining 2 statements in one - Reorder DBUG lines - Use a variable to store a pointer that is used multiple times - Moved declaration of variables to start of loop/function - Removed dead or commented code - Removed wrong DBUG_EXECUTE code in best_extension_by_limited_search()
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 987a4d950ea..9f7cd25f49f 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -5973,7 +5973,7 @@ unit_common_op st_select_lex_unit::common_op()
else
{
if (operation != op)
- operation= OP_MIX;
+ return OP_MIX;
}
}
}
@@ -5983,12 +5983,13 @@ unit_common_op st_select_lex_unit::common_op()
Save explain structures of a UNION. The only variable member is whether the
union has "Using filesort".
- There is also save_union_explain_part2() function, which is called before we read
- UNION's output.
+ There is also save_union_explain_part2() function, which is called before we
+ read UNION's output.
The reason for it is examples like this:
- SELECT col1 FROM t1 UNION SELECT col2 FROM t2 ORDER BY (select ... from t3 ...)
+ SELECT col1 FROM t1 UNION SELECT col2 FROM t2
+ ORDER BY (select ... from t3 ...)
Here, the (select ... from t3 ...) subquery must be a child of UNION's
st_select_lex. However, it is not connected as child until a very late
@@ -10183,7 +10184,7 @@ SELECT_LEX_UNIT *LEX::parsed_select_expr_cont(SELECT_LEX_UNIT *unit,
/**
Add primary expression as the next term in a given query expression body
- pruducing a new query expression body
+ producing a new query expression body
*/
SELECT_LEX_UNIT *