summaryrefslogtreecommitdiff
path: root/sql/sql_prepare.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-11-08 17:53:32 +0200
committermonty@mysql.com <>2004-11-08 17:53:32 +0200
commit10871866578b68a656057797db9ac8f08418238a (patch)
tree8b26ea79c2cf98b50f42ec02a9c92e62c98f6276 /sql/sql_prepare.cc
parent401ede54b71028c5b4cb85a0a7deb520f5ed989d (diff)
parent4fbf62e6c2a8dd51c9bcaea13ab92af5cbff7961 (diff)
downloadmariadb-git-10871866578b68a656057797db9ac8f08418238a.tar.gz
Merge with 4.1 to get new thd->mem_root handling
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r--sql/sql_prepare.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index d908e63210a..4f94bfb6c05 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1070,7 +1070,7 @@ static int mysql_test_select(Prepared_statement *stmt,
DBUG_RETURN(1);
#endif
- if (!lex->result && !(lex->result= new (&stmt->mem_root) select_send))
+ if (!lex->result && !(lex->result= new (stmt->mem_root) select_send))
{
send_error(thd);
goto err;
@@ -1518,7 +1518,7 @@ static bool init_param_array(Prepared_statement *stmt)
List_iterator<Item_param> param_iterator(lex->param_list);
/* Use thd->mem_root as it points at statement mem_root */
stmt->param_array= (Item_param **)
- alloc_root(&stmt->thd->mem_root,
+ alloc_root(stmt->thd->mem_root,
sizeof(Item_param*) * stmt->param_count);
if (!stmt->param_array)
{
@@ -1584,7 +1584,7 @@ int mysql_stmt_prepare(THD *thd, char *packet, uint packet_length,
if (name)
{
stmt->name.length= name->length;
- if (!(stmt->name.str= memdup_root(&stmt->mem_root, (char*)name->str,
+ if (!(stmt->name.str= memdup_root(stmt->mem_root, (char*)name->str,
name->length)))
{
delete stmt;