summaryrefslogtreecommitdiff
path: root/mysys/safemalloc.c
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2002-09-11 06:40:08 +0300
committermonty@mashka.mysql.fi <>2002-09-11 06:40:08 +0300
commitf3a186c90566602c18b5fca95f19f92374c06b64 (patch)
tree6ef035adfec09ec1e444dd169712750e2de1efeb /mysys/safemalloc.c
parent5ee7d7e73c5d97c53a435e544d3eb540f704e8c7 (diff)
downloadmariadb-git-f3a186c90566602c18b5fca95f19f92374c06b64.tar.gz
Portability fixes.
Improve mysql-test to be more robust. Fix that GRANT doesn't delete SSL options Change innobase_flush_log_at_trx_commit to uint. Don't rotate logs if we read a rotate log entry from the master.
Diffstat (limited to 'mysys/safemalloc.c')
-rw-r--r--mysys/safemalloc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c
index 9615126f237..f7e77878e41 100644
--- a/mysys/safemalloc.c
+++ b/mysys/safemalloc.c
@@ -538,3 +538,17 @@ my_string _my_strdup(const char *from, const char *sFile, uint uLine,
memcpy((byte*) ptr, (byte*) from,(size_t) length);
return((my_string) ptr);
} /* _my_strdup */
+
+
+my_string _my_strdup_with_length(const char *from, uint length,
+ const char *sFile, uint uLine,
+ myf MyFlags)
+{
+ gptr ptr;
+ if ((ptr=_mymalloc(length+1,sFile,uLine,MyFlags)) != 0)
+ {
+ memcpy((byte*) ptr, (byte*) from,(size_t) length);
+ ptr[length]=0;
+ }
+ return((my_string) ptr);
+}