summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 137af80313a..2bbca220db9 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -204,6 +204,8 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
DBUG_RETURN(1);
}
+ stmt->affected_rows= stmt->mysql->affected_rows;
+ stmt->insert_id= stmt->mysql->insert_id;
DBUG_RETURN(0);
}
@@ -612,13 +614,14 @@ bool Protocol::send_fields(List<Item> *list, uint flag)
if (!(res=item->val_str(&tmp)))
{
- client_field->def= strdup_root(field_alloc, "");
client_field->def_length= 0;
+ client_field->def= strmake_root(field_alloc, "",0);
}
else
{
- client_field->def= strdup_root(field_alloc, res->ptr());
client_field->def_length= res->length();
+ client_field->def= strmake_root(field_alloc, res->ptr(),
+ client_field->def_length);
}
}
else