diff options
author | Evgeny Potemkin <epotemkin@mysql.com> | 2009-07-18 18:09:56 +0400 |
---|---|---|
committer | Evgeny Potemkin <epotemkin@mysql.com> | 2009-07-18 18:09:56 +0400 |
commit | 5032380084a61445cba0c7455c95f2abf9125612 (patch) | |
tree | 741adb9eb42191a579c1556e8e74300a8eac5e85 /sql/item.cc | |
parent | 63e6a59d7398673c32a00ed163f76420a85120dd (diff) | |
download | mariadb-git-5032380084a61445cba0c7455c95f2abf9125612.tar.gz |
Bug#46051: Incorrectly market field caused wrong result.
When during the optimization an item is moved to the upper select
the item's context left unchanged. This caused wrong result in the
PS/SP mode.
The Item_ident::remove_dependence_processor now sets the context
of the select to which the item is moved to.
mysql-test/r/subselect.result:
The test case for the bug#46051 is adjusted.
mysql-test/t/subselect.test:
The test case for the bug#46051 is adjusted.
sql/item.cc:
Bug#46051: Incorrectly market field caused wrong result.
The Item_ident::remove_dependence_processor now sets the context
of the select to which the item is moved to.
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc index 1e379527fb7..eecb48aa16f 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -598,6 +598,7 @@ bool Item_ident::remove_dependence_processor(byte * arg) DBUG_ENTER("Item_ident::remove_dependence_processor"); if (depended_from == (st_select_lex *) arg) depended_from= 0; + context= &((st_select_lex *) arg)->context; DBUG_RETURN(0); } |