diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2014-05-31 12:31:26 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2014-05-31 12:31:26 +0200 |
commit | 128136cbdf7745ea0d1721bb574180034065912a (patch) | |
tree | 143ca65cd1136b77bf06cd368e23f90d6c097466 /storage/connect/filamdbf.cpp | |
parent | 9cb4b6c00985b3f70ed30dcefc8770b34f334c47 (diff) | |
parent | 7bbcc3e4ed6eef226b6978615cd64294b6bfe95c (diff) | |
download | mariadb-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.cpp | 58 |
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; |