diff options
author | unknown <pem@mysql.com> | 2006-04-18 11:20:18 +0200 |
---|---|---|
committer | unknown <pem@mysql.com> | 2006-04-18 11:20:18 +0200 |
commit | 750bc26998ce0ccf5bd78d255d54206bf716f1c2 (patch) | |
tree | a1d374f8b67363c3dcd44a332bdda02ebc7d6b6c /sql | |
parent | 7069599748259e59353bce21e8b5ae7cd4b8ff44 (diff) | |
parent | d9142f992ee5c60a487cb631594ff27352df7f64 (diff) | |
download | mariadb-git-750bc26998ce0ccf5bd78d255d54206bf716f1c2.tar.gz |
Merge mysql.com:/extern/mysql/bk/mysql-5.0-runtime
into mysql.com:/extern/mysql/5.0/bug18787/mysql-5.0-runtime
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item_func.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_func.cc | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index d4a0e607fc2..32568f8e1c7 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4747,7 +4747,9 @@ Item_func_sp::sp_result_field(void) const share->table_cache_key = empty_name; share->table_name = empty_name; } - field= m_sp->create_result_field(max_length, name, dummy_table); + if (!(field= m_sp->create_result_field(max_length, name, dummy_table))) + my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); + DBUG_RETURN(field); } @@ -4775,8 +4777,9 @@ Item_func_sp::execute(Field **flp) { if (!(*flp= f= sp_result_field())) { - my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); - return 0; + /* Error set by sp_result_field() */ + null_value= 1; + return TRUE; } f->move_field((f->pack_length() > sizeof(result_buf)) ? @@ -4931,16 +4934,19 @@ longlong Item_func_found_rows::val_int() Field * Item_func_sp::tmp_table_field(TABLE *t_arg) { - Field *res= 0; + Field *field= 0; DBUG_ENTER("Item_func_sp::tmp_table_field"); if (m_sp) - res= m_sp->create_result_field(max_length, (const char*) name, t_arg); + field= m_sp->create_result_field(max_length, (const char*) name, t_arg); - if (!res) - res= Item_func::tmp_table_field(t_arg); + if (!field) + field= Item_func::tmp_table_field(t_arg); - DBUG_RETURN(res); + if (!field) + my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); + + DBUG_RETURN(field); } |