diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2013-06-16 19:07:27 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2013-06-16 19:07:27 +0200 |
commit | b5130b5bd26eeb8b2bcfe1b38b10fbbbd9b68743 (patch) | |
tree | a3cb4dd4ff6db8afda387d0fa6c1de29c4d6baba /storage/connect/plugutil.c | |
parent | b0c378b4502c893e55930d4258d9e4ffd8e32f98 (diff) | |
download | mariadb-git-b5130b5bd26eeb8b2bcfe1b38b10fbbbd9b68743.tar.gz |
- Implemented: The use of Federated servers.
modified:
storage/connect/global.h
storage/connect/ha_connect.cc
storage/connect/plugutil.c
storage/connect/tabmysql.cpp
storage/connect/tabmysql.h
storage/connect/tabtbl.cpp
Diffstat (limited to 'storage/connect/plugutil.c')
-rw-r--r-- | storage/connect/plugutil.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/storage/connect/plugutil.c b/storage/connect/plugutil.c index e8098bb2512..7910f1ea318 100644 --- a/storage/connect/plugutil.c +++ b/storage/connect/plugutil.c @@ -512,6 +512,23 @@ void *PlugSubAlloc(PGLOBAL g, void *memp, size_t size) } /* end of PlugSubAlloc */ /***********************************************************************/ +/* This routine suballocate a copy of the passed string. */ +/***********************************************************************/ +char *PlugDup(PGLOBAL g, const char *str) + { + char *buf; + size_t len; + + if (str && (len = strlen(str))) { + buf = (char*)PlugSubAlloc(g, NULL, len + 1); + strcpy(buf, str); + } else + buf = NULL; + + return(buf); + } /* end of PlugDup */ + +/***********************************************************************/ /* This routine makes a pointer from an offset to a memory pointer. */ /***********************************************************************/ void *MakePtr(void *memp, OFFSET offset) |