diff options
author | unknown <sergefp@mysql.com> | 2006-08-24 19:14:36 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2006-08-24 19:14:36 +0400 |
commit | c74c8195330ff1e7b3274f6c78d968bf026e5037 (patch) | |
tree | 6b29b41583369e101d9f700f11242eda782d1e05 /sql/item_subselect.cc | |
parent | 9907e970aea28ce186e110084c3a4f2d6ac0c602 (diff) | |
download | mariadb-git-c74c8195330ff1e7b3274f6c78d968bf026e5037.tar.gz |
Bug #16255: Subquery in WHERE (the cset by Georgi Kodinov)
Must not use Item_direct_ref in HAVING because it points to
the new value (witch is not yet calculated for the first row).
mysql-test/r/subselect.result:
Bug #16255: Subquery in where
- test case
mysql-test/t/subselect.test:
Bug #16255: Subquery in where
- test case
sql/item_subselect.cc:
Bug #16255: Subquery in where
Must not use Item_direct_ref in HAVING because it points to
the new value (witch is not yet calculated for the first row).
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index c95a91de13e..13beb022c9d 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -976,18 +976,18 @@ Item_in_subselect::row_value_transformer(JOIN *join) DBUG_RETURN(RES_ERROR); Item *item_eq= new Item_func_eq(new - Item_direct_ref((*optimizer->get_cache())-> + Item_ref((*optimizer->get_cache())-> addr(i), (char *)"<no matter>", (char *)in_left_expr_name), new - Item_direct_ref(select_lex->ref_pointer_array + i, + Item_ref(select_lex->ref_pointer_array + i, (char *)"<no matter>", (char *)"<list ref>") ); Item *item_isnull= new Item_func_isnull(new - Item_direct_ref( select_lex-> + Item_ref( select_lex-> ref_pointer_array+i, (char *)"<no matter>", (char *)"<list ref>") @@ -1000,7 +1000,7 @@ Item_in_subselect::row_value_transformer(JOIN *join) new Item_is_not_null_test(this, new - Item_direct_ref(select_lex-> + Item_ref(select_lex-> ref_pointer_array + i, (char *)"<no matter>", (char *)"<list ref>") @@ -1057,7 +1057,7 @@ Item_in_subselect::row_value_transformer(JOIN *join) new Item_is_not_null_test(this, new - Item_direct_ref(select_lex-> + Item_ref(select_lex-> ref_pointer_array + i, (char *)"<no matter>", (char *)"<list ref>") |