diff options
author | monty@mashka.mysql.fi <> | 2002-09-11 06:40:08 +0300 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-09-11 06:40:08 +0300 |
commit | f3a186c90566602c18b5fca95f19f92374c06b64 (patch) | |
tree | 6ef035adfec09ec1e444dd169712750e2de1efeb /mysys/my_malloc.c | |
parent | 5ee7d7e73c5d97c53a435e544d3eb540f704e8c7 (diff) | |
download | mariadb-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/my_malloc.c')
-rw-r--r-- | mysys/my_malloc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c index 1e7cdd3a3b5..fc2f22b079a 100644 --- a/mysys/my_malloc.c +++ b/mysys/my_malloc.c @@ -81,3 +81,15 @@ my_string my_strdup(const char *from, myf MyFlags) memcpy((byte*) ptr, (byte*) from,(size_t) length); return((my_string) ptr); } + + +gptr my_strdup_with_length(const byte *from, uint length, myf MyFlags) +{ + gptr ptr; + if ((ptr=my_malloc(length+1,MyFlags)) != 0) + { + memcpy((byte*) ptr, (byte*) from,(size_t) length); + ptr[length]=0; + } + return(ptr); +} |