summaryrefslogtreecommitdiff
path: root/sql/item_subselect.h
diff options
context:
space:
mode:
authorunknown <gkodinov@mysql.com>2006-05-11 15:30:54 +0300
committerunknown <gkodinov@mysql.com>2006-05-11 15:30:54 +0300
commitaeaaa45626fe0d0605f78660e2ae47cb91e26c14 (patch)
tree806e73783799e5eb151e4898a3ed1e6c801f1091 /sql/item_subselect.h
parent588082712a50ecc4bc213291c6fe74986ec69c38 (diff)
downloadmariadb-git-aeaaa45626fe0d0605f78660e2ae47cb91e26c14.tar.gz
BUG#7549: Missing error message for invalid view selection with subquery.
When a view statement is compiled on CREATE VIEW time, most of the optimizations should not be done. Finding the right optimization for a subquery is one of them. Unfortunately the optimizer is resolving the column references of the left expression of IN subqueries in the process of deciding witch optimization to use (if needed). So there should be a special case in Item_in_subselect::fix_fields() : check the validity of the left expression of IN subqueries in CREATE VIEW mode and then proceed as normal. mysql-test/r/subselect.result: test case mysql-test/r/view.result: chnaged explain due to column being resolved mysql-test/t/subselect.test: test case sql/item_subselect.cc: overloaded fix_fields to fix the left_expr in prepare_view_mode sql/item_subselect.h: fix_fields overloaded so it can prepare left_expr
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r--sql/item_subselect.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index a4dac5bda87..293408dc09e 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -258,6 +258,7 @@ public:
void top_level_item() { abort_on_null=1; }
bool test_limit(st_select_lex_unit *unit);
void print(String *str);
+ bool fix_fields(THD *thd, Item **ref);
friend class Item_ref_null_helper;
friend class Item_is_not_null_test;