summaryrefslogtreecommitdiff
path: root/storage/connect/filamdbf.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/filamdbf.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/filamdbf.cpp')
-rw-r--r--storage/connect/filamdbf.cpp58
1 files changed, 30 insertions, 28 deletions
diff --git a/storage/connect/filamdbf.cpp b/storage/connect/filamdbf.cpp
index 7ac81117f35..7ca98eeff55 100644
--- a/storage/connect/filamdbf.cpp
+++ b/storage/connect/filamdbf.cpp
@@ -546,10 +546,11 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g)
PDOSDEF tdp = (PDOSDEF)Tdbp->GetDef();
// Count the number of columns
- for (cdp = tdp->GetCols(); cdp; cdp = cdp->GetNext()) {
- reclen += cdp->GetLong();
- n++;
- } // endfor cdp
+ for (cdp = tdp->GetCols(); cdp; cdp = cdp->GetNext())
+ if (!(cdp->Flags & U_SPECIAL)) {
+ reclen += cdp->GetLong();
+ n++;
+ } // endif Flags
if (Lrecl != reclen) {
sprintf(g->Message, MSG(BAD_LRECL), Lrecl, reclen);
@@ -570,30 +571,31 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g)
descp = (DESCRIPTOR*)header;
// Currently only standard Xbase types are supported
- for (cdp = tdp->GetCols(); cdp; cdp = cdp->GetNext()) {
- descp++;
-
- switch ((c = *GetFormatType(cdp->GetType()))) {
- case 'S': // Short integer
- case 'L': // Large (big) integer
- case 'T': // Tiny integer
- c = 'N'; // Numeric
- case 'N': // Numeric (integer)
- case 'F': // Float (double)
- descp->Decimals = (uchar)cdp->F.Prec;
- case 'C': // Char
- case 'D': // Date
- break;
- default: // Should never happen
- sprintf(g->Message, "Unsupported DBF type %c for column %s",
- c, cdp->GetName());
- return true;
- } // endswitch c
-
- strncpy(descp->Name, cdp->GetName(), 11);
- descp->Type = c;
- descp->Length = (uchar)cdp->GetLong();
- } // endfor cdp
+ for (cdp = tdp->GetCols(); cdp; cdp = cdp->GetNext())
+ if (!(cdp->Flags & U_SPECIAL)) {
+ descp++;
+
+ switch ((c = *GetFormatType(cdp->GetType()))) {
+ case 'S': // Short integer
+ case 'L': // Large (big) integer
+ case 'T': // Tiny integer
+ c = 'N'; // Numeric
+ case 'N': // Numeric (integer)
+ case 'F': // Float (double)
+ descp->Decimals = (uchar)cdp->F.Prec;
+ case 'C': // Char
+ case 'D': // Date
+ break;
+ default: // Should never happen
+ sprintf(g->Message, "Unsupported DBF type %c for column %s",
+ c, cdp->GetName());
+ return true;
+ } // endswitch c
+
+ strncpy(descp->Name, cdp->GetName(), 11);
+ descp->Type = c;
+ descp->Length = (uchar)cdp->GetLong();
+ } // endif Flags
*(char*)(++descp) = EOH;