summaryrefslogtreecommitdiff
path: root/libmysqld/lib_sql.cc
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2004-05-15 17:07:44 +0500
committerunknown <hf@deer.(none)>2004-05-15 17:07:44 +0500
commit05cd698f542f295b4fcd28d4704bce0f37e534ca (patch)
tree925a39dedaa9aafde9d5be890ca8a898aeb7f4bc /libmysqld/lib_sql.cc
parentae95f38200b226191a290cf840e0d06b17304f82 (diff)
downloadmariadb-git-05cd698f542f295b4fcd28d4704bce0f37e534ca.tar.gz
Fixes for #3371, #3372, #3374, #3375, #3376
libmysql/libmysql.c: code to fix #3772 counting of field->max_length moved to mysql_store_stmt_result so it will work in libmysqld also libmysqld/lib_sql.cc: to fix #3771 and #3775 stmt->affected_rows specifying added code getting default values changed so it will add terminating /0 to values sql/sql_parse.cc: to fix #3773 silly mistake here :\ sql/sql_prepare.cc: to fix #3774 and #3776 special function for datetime values in embedded server added unsigned flag now specified for values in embedded server tests/client_test.c: this test fails if privilege-checking pars are disabled (it's the default for libmysqld)
Diffstat (limited to 'libmysqld/lib_sql.cc')
-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 cfb50d3907a..09b03e38f2e 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -197,6 +197,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);
}
@@ -605,13 +607,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