summaryrefslogtreecommitdiff
path: root/storage/ndb/src/ndbapi
diff options
context:
space:
mode:
authorunknown <lzhou/root@dev3-138.dev.cn.tlan>2006-11-01 10:53:24 +0000
committerunknown <lzhou/root@dev3-138.dev.cn.tlan>2006-11-01 10:53:24 +0000
commitce8011429a2729597ec7ddc9372f259e4eb53d6b (patch)
tree896be89a06cd68e9eaf8c7b2ab52adaf7d60022d /storage/ndb/src/ndbapi
parent9372279460618d762a18251fe6843df24684e432 (diff)
parente997b3622ae48f5a710d5fb91b8a012ba8a35266 (diff)
downloadmariadb-git-ce8011429a2729597ec7ddc9372f259e4eb53d6b.tar.gz
Merge dev3-138.dev.cn.tlan:/home/zhl/mysql/mysql-5.0/bug21052
into dev3-138.dev.cn.tlan:/home/zhl/mysql/mysql-5.1/bug21052 storage/ndb/include/ndbapi/ndberror.h: Auto merged storage/ndb/src/mgmsrv/Services.cpp: Auto merged storage/ndb/src/ndbapi/ndberror.c: Auto merged
Diffstat (limited to 'storage/ndb/src/ndbapi')
-rw-r--r--storage/ndb/src/ndbapi/ndberror.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c
index 083830e8b44..68c521e7b82 100644
--- a/storage/ndb/src/ndbapi/ndberror.c
+++ b/storage/ndb/src/ndbapi/ndberror.c
@@ -774,11 +774,14 @@ const char *ndberror_classification_message(ndberror_classification classificati
return empty_string;
}
-int ndb_error_string(int err_no, char *str, unsigned int size)
+int ndb_error_string(int err_no, char *str, int size)
{
ndberror_struct error;
- unsigned int len;
+ int len;
+ assert(size > 1);
+ if(size <= 1)
+ return 0;
error.code = err_no;
ndberror_update(&error);