diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-01-18 20:40:15 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-02-13 18:12:04 +0100 |
commit | eda2ebefba43bde1b1881688576e865f9ba9617c (patch) | |
tree | ea9cd5e9ff2c670643c158929f8db7ab7e660818 /sql | |
parent | cf003933785cbf88504bcf81001c776dabd64b15 (diff) | |
download | mariadb-git-eda2ebefba43bde1b1881688576e865f9ba9617c.tar.gz |
MDEV-11784 View is created with invalid definition which causes ERROR 1241 (21000): Operand should contain 1 column(s)
set the correct print precedence for IN subqueries
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_subselect.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 823dbc6c281..805e8958246 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -399,7 +399,7 @@ public: bool val_bool(); bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec(); - virtual void print(String *str, enum_query_type query_type); + void print(String *str, enum_query_type query_type); bool select_transformer(JOIN *join); void top_level_item() { abort_on_null=1; } inline bool is_top_level_item() { return abort_on_null; } @@ -616,7 +616,8 @@ public: void update_null_value () { (void) val_bool(); } bool val_bool(); bool test_limit(st_select_lex_unit *unit); - virtual void print(String *str, enum_query_type query_type); + void print(String *str, enum_query_type query_type); + enum precedence precedence() const { return CMP_PRECEDENCE; } bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec(); void fix_after_pullout(st_select_lex *new_parent, Item **ref); @@ -740,7 +741,7 @@ public: subs_type substype() { return all?ALL_SUBS:ANY_SUBS; } bool select_transformer(JOIN *join); void create_comp_func(bool invert) { func= func_creator(invert); } - virtual void print(String *str, enum_query_type query_type); + void print(String *str, enum_query_type query_type); bool is_maxmin_applicable(JOIN *join); bool transform_into_max_min(JOIN *join); void no_rows_in_result(); @@ -849,7 +850,7 @@ public: uint8 uncacheable(); void exclude(); table_map upper_select_const_tables(); - virtual void print (String *str, enum_query_type query_type); + void print (String *str, enum_query_type query_type); bool change_result(Item_subselect *si, select_result_interceptor *result, bool temp); @@ -883,7 +884,7 @@ public: uint8 uncacheable(); void exclude(); table_map upper_select_const_tables(); - virtual void print (String *str, enum_query_type query_type); + void print (String *str, enum_query_type query_type); bool change_result(Item_subselect *si, select_result_interceptor *result, bool temp= FALSE); @@ -940,7 +941,7 @@ public: uint8 uncacheable() { return UNCACHEABLE_DEPENDENT_INJECTED; } void exclude(); table_map upper_select_const_tables() { return 0; } - virtual void print (String *str, enum_query_type query_type); + void print (String *str, enum_query_type query_type); bool change_result(Item_subselect *si, select_result_interceptor *result, bool temp= FALSE); @@ -998,7 +999,7 @@ public: having(having_arg) {} int exec(); - virtual void print (String *str, enum_query_type query_type); + void print (String *str, enum_query_type query_type); virtual enum_engine_type engine_type() { return INDEXSUBQUERY_ENGINE; } }; @@ -1073,11 +1074,8 @@ public: void cleanup(); int prepare(THD *); int exec(); - virtual void print(String *str, enum_query_type query_type); - uint cols() - { - return materialize_engine->cols(); - } + void print(String *str, enum_query_type query_type); + uint cols() { return materialize_engine->cols(); } uint8 uncacheable() { return materialize_engine->uncacheable(); } table_map upper_select_const_tables() { return 0; } bool no_rows() { return !tmp_table->file->stats.records; } |