summaryrefslogtreecommitdiff
path: root/sql/item_windowfunc.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-06-18 12:40:53 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-06-18 15:43:59 +0300
commit0121d5a790983c08dabedc66e70f862e47f7c8c7 (patch)
tree5a3912526fd63ed6c1886240724c9116a6ac7577 /sql/item_windowfunc.cc
parent63027a5763b2b9550979366f9e7488b2d9328cc0 (diff)
parentc55de8d40bba29503773a6a56d6f13f19ca7e339 (diff)
downloadmariadb-git-0121d5a790983c08dabedc66e70f862e47f7c8c7.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/item_windowfunc.cc')
-rw-r--r--sql/item_windowfunc.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc
index a7f8ef09f08..66c4f5be665 100644
--- a/sql/item_windowfunc.cc
+++ b/sql/item_windowfunc.cc
@@ -86,9 +86,9 @@ Item_window_func::fix_fields(THD *thd, Item **ref)
{
DBUG_ASSERT(fixed == 0);
- enum_parsing_place place= thd->lex->current_select->context_analysis_place;
-
- if (!(place == SELECT_LIST || place == IN_ORDER_BY))
+ if (!thd->lex->current_select ||
+ (thd->lex->current_select->context_analysis_place != SELECT_LIST &&
+ thd->lex->current_select->context_analysis_place != IN_ORDER_BY))
{
my_error(ER_WRONG_PLACEMENT_OF_WINDOW_FUNCTION, MYF(0));
return true;