diff options
author | unknown <knielsen@mysql.com> | 2006-05-15 19:57:09 +0200 |
---|---|---|
committer | unknown <knielsen@mysql.com> | 2006-05-15 19:57:09 +0200 |
commit | 438131dde2ea8a3f976a9c3f7965229e097334e9 (patch) | |
tree | ce0b52385a77b4ea4f7edd803f1092147ced2f1d /sql/sp_head.cc | |
parent | 30c03e202d23527393d7a6e6c9d0794705d06317 (diff) | |
parent | dccd333ecf4d566029c40e18bee33f6019bc2420 (diff) | |
download | mariadb-git-438131dde2ea8a3f976a9c3f7965229e097334e9.tar.gz |
Merge bk-internal:/home/bk/mysql-5.0
into mysql.com:/usr/local/mysql/tmp-5.0
sql/sp_head.cc:
Manual merge.
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 21a0503bbec..d5c57eca76e 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -310,11 +310,13 @@ sp_prepare_func_item(THD* thd, Item **it_addr) */ bool -sp_eval_expr(THD *thd, Field *result_field, Item *expr_item) +sp_eval_expr(THD *thd, Field *result_field, Item **expr_item_ptr) { + Item *expr_item; + DBUG_ENTER("sp_eval_expr"); - if (!(expr_item= sp_prepare_func_item(thd, &expr_item))) + if (!(expr_item= sp_prepare_func_item(thd, expr_item_ptr))) DBUG_RETURN(TRUE); bool err_status= FALSE; @@ -1281,7 +1283,7 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount, /* Arguments must be fixed in Item_func_sp::fix_fields */ DBUG_ASSERT(argp[arg_no]->fixed); - if ((err_status= nctx->set_variable(thd, arg_no, argp[arg_no]))) + if ((err_status= nctx->set_variable(thd, arg_no, &(argp[arg_no])))) goto err_with_cleanup; } @@ -1485,7 +1487,7 @@ sp_head::execute_procedure(THD *thd, List<Item> *args) Item_null *null_item= new Item_null(); if (!null_item || - nctx->set_variable(thd, i, null_item)) + nctx->set_variable(thd, i, (struct Item **)&null_item)) { err_status= TRUE; break; @@ -1493,7 +1495,7 @@ sp_head::execute_procedure(THD *thd, List<Item> *args) } else { - if (nctx->set_variable(thd, i, *it_args.ref())) + if (nctx->set_variable(thd, i, it_args.ref())) { err_status= TRUE; break; @@ -2326,7 +2328,7 @@ sp_instr_set::execute(THD *thd, uint *nextp) int sp_instr_set::exec_core(THD *thd, uint *nextp) { - int res= thd->spcont->set_variable(thd, m_offset, m_value); + int res= thd->spcont->set_variable(thd, m_offset, &m_value); if (res && thd->spcont->found_handler_here()) { @@ -2596,7 +2598,7 @@ sp_instr_freturn::exec_core(THD *thd, uint *nextp) do it in scope of execution the current context/block. */ - return thd->spcont->set_return_value(thd, m_value); + return thd->spcont->set_return_value(thd, &m_value); } void @@ -3040,7 +3042,7 @@ sp_instr_set_case_expr::execute(THD *thd, uint *nextp) int sp_instr_set_case_expr::exec_core(THD *thd, uint *nextp) { - int res= thd->spcont->set_case_expr(thd, m_case_expr_id, m_case_expr); + int res= thd->spcont->set_case_expr(thd, m_case_expr_id, &m_case_expr); if (res && !thd->spcont->get_case_expr(m_case_expr_id) && @@ -3054,7 +3056,7 @@ sp_instr_set_case_expr::exec_core(THD *thd, uint *nextp) Item *null_item= new Item_null(); if (!null_item || - thd->spcont->set_case_expr(thd, m_case_expr_id, null_item)) + thd->spcont->set_case_expr(thd, m_case_expr_id, &null_item)) { /* If this also failed, we have to abort. */ |