diff options
author | unknown <anozdrin/alik@station.> | 2007-10-05 16:35:01 +0400 |
---|---|---|
committer | unknown <anozdrin/alik@station.> | 2007-10-05 16:35:01 +0400 |
commit | c215e78d1607a9afc55df3df3d5499d283ffed63 (patch) | |
tree | c2cb139377c0c573cd55e57158ba3f61abedffce /sql/item_func.h | |
parent | 11476cfc042a316399efbd59016a9898390f0f6b (diff) | |
download | mariadb-git-c215e78d1607a9afc55df3df3d5499d283ffed63.tar.gz |
Fix for BUG#20550: Stored function: wrong RETURN type metadata
when used in a VIEW.
The problem was that wrong function (create_tmp_from_item())
was used to create a temporary field for Item_func_sp.
The fix is to use create_tmp_from_field().
mysql-test/r/sp.result:
Update result file.
mysql-test/t/sp.test:
Add a test case for BUG#20550.
sql/item_func.h:
Add a getter for Item_func_sp::sp_result_field.
sql/sql_select.cc:
Use create_tmp_from_field() to create a temporary field
for Item_func_sp.
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index ea22e35773d..66a417f31fa 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1535,6 +1535,11 @@ public: bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec(void); bool is_expensive() { return 1; } + + inline Field *get_sp_result_field() + { + return sp_result_field; + } }; |