mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
- Implement the SERVID special columns. This imply modifying the way
special columns are processed. This will be documented. Also some code cleanup and some changes to prepare the indexing of nullable columns (not achieve yet) modified: storage/connect/colblk.cpp storage/connect/colblk.h storage/connect/connect.cc storage/connect/connect.h storage/connect/ha_connect.cc storage/connect/ha_connect.h storage/connect/macutil.cpp storage/connect/mycat.cc storage/connect/plgdbsem.h storage/connect/reldef.cpp storage/connect/reldef.h storage/connect/table.cpp storage/connect/tabmysql.cpp storage/connect/tabmysql.h storage/connect/tabodbc.h storage/connect/tabtbl.cpp storage/connect/tabutil.h storage/connect/value.h storage/connect/xindex.cpp storage/connect/xindex.h storage/connect/xtable.h
This commit is contained in:
@@ -383,32 +383,35 @@ int COLDEF::Define(PGLOBAL g, void *memp, PCOLINFO cfp, int poff)
|
||||
Name = (PSZ)PlugSubAlloc(g, memp, strlen(cfp->Name) + 1);
|
||||
strcpy(Name, cfp->Name);
|
||||
|
||||
Poff = poff;
|
||||
Buf_Type = cfp->Type;
|
||||
if (!(cfp->Flags & U_SPECIAL)) {
|
||||
Poff = poff;
|
||||
Buf_Type = cfp->Type;
|
||||
|
||||
if ((Clen = GetTypeSize(Buf_Type, cfp->Length)) <= 0) {
|
||||
sprintf(g->Message, MSG(BAD_COL_TYPE), GetTypeName(Buf_Type), Name);
|
||||
return -1;
|
||||
} // endswitch
|
||||
if ((Clen = GetTypeSize(Buf_Type, cfp->Length)) <= 0) {
|
||||
sprintf(g->Message, MSG(BAD_COL_TYPE), GetTypeName(Buf_Type), Name);
|
||||
return -1;
|
||||
} // endswitch
|
||||
|
||||
strcpy(F.Type, GetFormatType(Buf_Type));
|
||||
F.Length = cfp->Length;
|
||||
F.Prec = cfp->Prec;
|
||||
Offset = (cfp->Offset < 0) ? poff : cfp->Offset;
|
||||
Long = cfp->Length;
|
||||
Opt = cfp->Opt;
|
||||
Key = cfp->Key;
|
||||
//Freq = cfp->Freq;
|
||||
strcpy(F.Type, GetFormatType(Buf_Type));
|
||||
F.Length = cfp->Length;
|
||||
F.Prec = cfp->Prec;
|
||||
Offset = (cfp->Offset < 0) ? poff : cfp->Offset;
|
||||
Long = cfp->Length;
|
||||
Opt = cfp->Opt;
|
||||
Key = cfp->Key;
|
||||
// Freq = cfp->Freq;
|
||||
|
||||
if (cfp->Remark && *cfp->Remark) {
|
||||
Desc = (PSZ)PlugSubAlloc(g, memp, strlen(cfp->Remark) + 1);
|
||||
strcpy(Desc, cfp->Remark);
|
||||
} // endif Remark
|
||||
if (cfp->Remark && *cfp->Remark) {
|
||||
Desc = (PSZ)PlugSubAlloc(g, memp, strlen(cfp->Remark) + 1);
|
||||
strcpy(Desc, cfp->Remark);
|
||||
} // endif Remark
|
||||
|
||||
if (cfp->Datefmt) {
|
||||
Decode = (PSZ)PlugSubAlloc(g, memp, strlen(cfp->Datefmt) + 1);
|
||||
strcpy(Decode, cfp->Datefmt);
|
||||
} // endif Datefmt
|
||||
if (cfp->Datefmt) {
|
||||
Decode = (PSZ)PlugSubAlloc(g, memp, strlen(cfp->Datefmt) + 1);
|
||||
strcpy(Decode, cfp->Datefmt);
|
||||
} // endif Datefmt
|
||||
|
||||
} // endif special
|
||||
|
||||
if (cfp->Fieldfmt) {
|
||||
Fmt = (PSZ)PlugSubAlloc(g, memp, strlen(cfp->Fieldfmt) + 1);
|
||||
@@ -416,7 +419,7 @@ int COLDEF::Define(PGLOBAL g, void *memp, PCOLINFO cfp, int poff)
|
||||
} // endif Fieldfmt
|
||||
|
||||
Flags = cfp->Flags;
|
||||
return (Flags & U_VIRTUAL) ? 0 : Long;
|
||||
return (Flags & (U_VIRTUAL|U_SPECIAL)) ? 0 : Long;
|
||||
} // end of Define
|
||||
|
||||
/* ------------------------- End of RelDef --------------------------- */
|
||||
|
Reference in New Issue
Block a user