summaryrefslogtreecommitdiff
path: root/storage/connect/reldef.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2014-05-31 12:31:26 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2014-05-31 12:31:26 +0200
commit128136cbdf7745ea0d1721bb574180034065912a (patch)
tree143ca65cd1136b77bf06cd368e23f90d6c097466 /storage/connect/reldef.cpp
parent9cb4b6c00985b3f70ed30dcefc8770b34f334c47 (diff)
parent7bbcc3e4ed6eef226b6978615cd64294b6bfe95c (diff)
downloadmariadb-git-128136cbdf7745ea0d1721bb574180034065912a.tar.gz
- Add support of partition tables
modified: storage/connect/ha_connect.cc storage/connect/ha_connect.h storage/connect/reldef.cpp - Add INSERT/UPDATE support to PROXY tables modified: storage/connect/tabutil.cpp storage/connect/tabutil.h - Take care of SPECIAL columns modified: storage/connect/filamdbf.cpp storage/connect/reldef.h storage/connect/tabfmt.cpp -Typo and misc modified: storage/connect/odbconn.cpp storage/connect/tabfix.cpp storage/connect/xindex.cpp
Diffstat (limited to 'storage/connect/reldef.cpp')
-rw-r--r--storage/connect/reldef.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp
index 238cecc48eb..7b3818cc98b 100644
--- a/storage/connect/reldef.cpp
+++ b/storage/connect/reldef.cpp
@@ -132,19 +132,28 @@ int RELDEF::GetCharCatInfo(PSZ what, PSZ sdef, char *buf, int size)
/***********************************************************************/
char *RELDEF::GetStringCatInfo(PGLOBAL g, PSZ what, PSZ sdef)
{
- char *sval= NULL, *s= Hc->GetStringOption(what, sdef);
+ char *name, *sval= NULL, *s= Hc->GetStringOption(what, sdef);
if (s) {
- sval= (char*)PlugSubAlloc(g, NULL, strlen(s) + 1);
- strcpy(sval, s);
+ if (Hc->IsPartitioned() &&
+ (!stricmp(what, "filename") || !stricmp(what, "tabname"))) {
+ name= Hc->GetPartName();
+ sval= (char*)PlugSubAlloc(g, NULL, strlen(s) + strlen(name));
+ sprintf(sval, s, name);
+ } else {
+ sval= (char*)PlugSubAlloc(g, NULL, strlen(s) + 1);
+ strcpy(sval, s);
+ } // endif partitioned
+
} else if (!stricmp(what, "filename")) {
// Return default file name
char *ftype= Hc->GetStringOption("Type", "*");
int i, n;
if (IsFileType(GetTypeID(ftype))) {
- sval= (char*)PlugSubAlloc(g, NULL, strlen(Hc->GetTableName()) + 12);
- strcat(strcpy(sval, Hc->GetTableName()), ".");
+ name= Hc->GetPartName();
+ sval= (char*)PlugSubAlloc(g, NULL, strlen(name) + 12);
+ strcat(strcpy(sval, name), ".");
n= strlen(sval);
// Fold ftype to lower case