diff options
author | unknown <sanja@montyprogram.com> | 2012-09-06 00:14:33 +0300 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2012-09-06 00:14:33 +0300 |
commit | caedd1992c0926f41e3fb5f8b6f430d9a2a827a9 (patch) | |
tree | 608480bb375937718737c67d12dd3ec0edca303a /sql/item.cc | |
parent | 24b9d7e43f8251263863f52bfefb00eacf2523ae (diff) | |
parent | 54bb28d4a151d0eb5c3b74edb40ddf6e118c124b (diff) | |
download | mariadb-git-caedd1992c0926f41e3fb5f8b6f430d9a2a827a9.tar.gz |
merge 5.3->5.5
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc index 582865a1b61..4d80a153785 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -7759,6 +7759,13 @@ Item* Item_cache_wrapper::get_tmp_table_item(THD *thd_arg) } +bool Item_direct_view_ref::send(Protocol *protocol, String *buffer) +{ + if (check_null_ref()) + return protocol->store_null(); + return Item_direct_ref::send(protocol, buffer); +} + /** Prepare referenced field then call usual Item_direct_ref::fix_fields . @@ -7773,6 +7780,7 @@ Item* Item_cache_wrapper::get_tmp_table_item(THD *thd_arg) bool Item_direct_view_ref::fix_fields(THD *thd, Item **reference) { + DBUG_ASSERT(1); /* view fild reference must be defined */ DBUG_ASSERT(*ref); /* (*ref)->check_cols() will be made in Item_direct_ref::fix_fields */ @@ -9285,7 +9293,7 @@ bool Item_type_holder::join_types(THD *thd, Item *item) item->max_length, item->decimals)); fld_type= Field::field_type_merge(fld_type, get_real_type(item)); { - int item_decimals= item->decimals; + uint item_decimals= item->decimals; /* fix variable decimals which always is NOT_FIXED_DEC */ if (Field::result_merge_type(fld_type) == INT_RESULT) item_decimals= 0; |