diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-04-29 00:38:10 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-04-29 00:38:10 +0200 |
commit | c4499a03917aecfc2d86142c469d02618cbec54b (patch) | |
tree | 9cd51b7c8d2274300165840204ae3eb19401942f /sql/item.cc | |
parent | d6dbe8e2071bf9fdc21b5530abce88ff01b40e25 (diff) | |
parent | 5cfe52314e29386e1867fad1b44eace2b9d0be7e (diff) | |
download | mariadb-git-c4499a03917aecfc2d86142c469d02618cbec54b.tar.gz |
Merge branch '5.5' into 10.0
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc index 5f8cf6c80f7..5d413c38dd0 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -548,6 +548,7 @@ Item::Item(): in_rollup= 0; decimals= 0; max_length= 0; with_subselect= 0; + with_param= 0; cmp_context= IMPOSSIBLE_RESULT; /* Initially this item is not attached to any JOIN_TAB. */ join_tab_idx= MAX_TABLES; @@ -594,6 +595,7 @@ Item::Item(THD *thd, Item *item): null_value(item->null_value), unsigned_flag(item->unsigned_flag), with_sum_func(item->with_sum_func), + with_param(item->with_param), with_field(item->with_field), fixed(item->fixed), is_autogenerated_name(item->is_autogenerated_name), @@ -1475,6 +1477,9 @@ bool Item_sp_variable::fix_fields(THD *thd, Item **) max_length= it->max_length; decimals= it->decimals; unsigned_flag= it->unsigned_flag; + with_param= 1; + if (thd->lex->current_select->master_unit()->item) + thd->lex->current_select->master_unit()->item->with_param= 1; fixed= 1; collation.set(it->collation.collation, it->collation.derivation); @@ -7220,6 +7225,7 @@ void Item_ref::set_properties() split_sum_func() doesn't try to change the reference. */ with_sum_func= (*ref)->with_sum_func; + with_param= (*ref)->with_param; with_field= (*ref)->with_field; unsigned_flag= (*ref)->unsigned_flag; fixed= 1; @@ -7667,6 +7673,7 @@ Item_cache_wrapper::Item_cache_wrapper(Item *item_arg) decimals= orig_item->decimals; collation.set(orig_item->collation); with_sum_func= orig_item->with_sum_func; + with_param= orig_item->with_param; with_field= orig_item->with_field; unsigned_flag= orig_item->unsigned_flag; name= item_arg->name; |