mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
- 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
This commit is contained in:
@@ -511,6 +511,23 @@ void *PlugSubAlloc(PGLOBAL g, void *memp, size_t size)
|
||||
return (memp);
|
||||
} /* 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. */
|
||||
/***********************************************************************/
|
||||
|
Reference in New Issue
Block a user