diff options
author | unknown <konstantin@mysql.com> | 2004-12-09 00:37:17 +0300 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2004-12-09 00:37:17 +0300 |
commit | 998209d36b93e1a0b6e2078b004a0cdbbaf5a712 (patch) | |
tree | 2f3c0d3a4b5c23216259de234496b30dac8169d9 /sql/item_subselect.cc | |
parent | 45643bc6aa24c7649b969f6ae58892090fc89736 (diff) | |
download | mariadb-git-998209d36b93e1a0b6e2078b004a0cdbbaf5a712.tar.gz |
A fix and test case for Bug#6873 "PS, having with subquery, crash
during execute"
mysql-test/r/ps.result:
Test results updated (Bug#6873)
mysql-test/t/ps.test:
A test case for Bug#6873 "PS, having with subquery, crash during execute".
sql/item_subselect.cc:
If we transform having subtree, modify SELECT_LEX::having pointer
to point to the new having tree root.
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 1265d0b3557..69941b36ca0 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -155,6 +155,8 @@ bool Item_subselect::fix_fields(THD *thd_param, TABLE_LIST *tables, Item **ref) // did we changed top item of WHERE condition if (unit->outer_select()->where == (*ref)) unit->outer_select()->where= substitution; // correct WHERE for PS + else if (unit->outer_select()->having == (*ref)) + unit->outer_select()->having= substitution; // correct HAVING for PS (*ref)= substitution; substitution->name= name; |