diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2014-03-22 08:57:32 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2014-03-22 08:57:32 +0100 |
commit | 81ce7da7a72e483b8f9d491c2d937d8ccc8c7b6e (patch) | |
tree | 6f076508d09cd50b09869ce00b5f5810133c3402 /storage/connect/filamap.cpp | |
parent | 7b400a088d049661b9a4dded385ac78923bb0017 (diff) | |
parent | 31560c448a62514f244b67d0925cd3837188e4c9 (diff) | |
download | mariadb-git-81ce7da7a72e483b8f9d491c2d937d8ccc8c7b6e.tar.gz |
- Resolving conflicts
modified:
storage/connect/block.h
storage/connect/colblk.cpp
storage/connect/connect.cc
storage/connect/csort.h
storage/connect/filamap.cpp
storage/connect/filamdbf.cpp
storage/connect/filamfix.cpp
storage/connect/filamtxt.cpp
storage/connect/filamzip.cpp
storage/connect/ha_connect.cc
storage/connect/mycat.cc
storage/connect/myconn.cpp
storage/connect/myutil.cpp
storage/connect/osutil.c
storage/connect/plgdbsem.h
storage/connect/plgdbutl.cpp
storage/connect/plugutil.c
storage/connect/reldef.cpp
storage/connect/tabcol.cpp
storage/connect/tabfmt.cpp
storage/connect/tabmysql.cpp
storage/connect/tabodbc.cpp
storage/connect/tabpivot.cpp
storage/connect/tabvct.cpp
storage/connect/user_connect.cc
storage/connect/valblk.cpp
storage/connect/value.cpp
storage/connect/xindex.cpp
Diffstat (limited to 'storage/connect/filamap.cpp')
-rw-r--r-- | storage/connect/filamap.cpp | 59 |
1 files changed, 28 insertions, 31 deletions
diff --git a/storage/connect/filamap.cpp b/storage/connect/filamap.cpp index 0c68a599496..87cb2e83cfa 100644 --- a/storage/connect/filamap.cpp +++ b/storage/connect/filamap.cpp @@ -46,6 +46,8 @@ #include "filamap.h"
#include "tabdos.h"
+extern "C" int trace;
+
/* --------------------------- Class MAPFAM -------------------------- */
/***********************************************************************/
@@ -89,9 +91,8 @@ int MAPFAM::GetFileLength(PGLOBAL g) len = (To_Fb) ? To_Fb->Length : TXTFAM::GetFileLength(g);
-#ifdef DEBTRACE
- htrc("Mapped file length=%d\n", len);
-#endif
+ if (trace)
+ htrc("Mapped file length=%d\n", len);
return len;
} // end of GetFileLength
@@ -166,9 +167,9 @@ bool MAPFAM::OpenTableFile(PGLOBAL g) sprintf(g->Message, MSG(OPEN_MODE_ERROR),
"map", (int) rc, filename);
-#ifdef DEBTRACE
- htrc("%s\n", g->Message);
-#endif
+ if (trace)
+ htrc("CreateFileMap: %s\n", g->Message);
+
return (mode == MODE_READ && rc == ENOENT)
? PushWarning(g, Tdbp) : true;
} // endif hFile
@@ -228,10 +229,9 @@ bool MAPFAM::OpenTableFile(PGLOBAL g) Fpos = Mempos = Memory;
Top = Memory + len;
-#ifdef DEBTRACE
- htrc("fp=%p count=%d MapView=%p len=%d Top=%p\n",
- fp, fp->Count, Memory, len, Top);
-#endif
+ if (trace)
+ htrc("fp=%p count=%d MapView=%p len=%d Top=%p\n",
+ fp, fp->Count, Memory, len, Top);
return AllocateBuffer(g); // Useful for DBF files
} // end of OpenTableFile
@@ -383,20 +383,19 @@ int MAPFAM::DeleteRecords(PGLOBAL g, int irc) {
int n;
-#ifdef DEBTRACE
- fprintf(debug,
- "MAP DeleteDB: irc=%d mempos=%p tobuf=%p Tpos=%p Spos=%p\n",
- irc, Mempos, To_Buf, Tpos, Spos);
-#endif
+ if (trace)
+ htrc("MAP DeleteDB: irc=%d mempos=%p tobuf=%p Tpos=%p Spos=%p\n",
+ irc, Mempos, To_Buf, Tpos, Spos);
if (irc != RC_OK) {
/*******************************************************************/
/* EOF: position Fpos at the top of map position. */
/*******************************************************************/
Fpos = Top;
-#ifdef DEBTRACE
- htrc("Fpos placed at file top=%p\n", Fpos);
-#endif
+
+ if (trace)
+ htrc("Fpos placed at file top=%p\n", Fpos);
+
} // endif irc
if (Tpos == Spos)
@@ -412,17 +411,16 @@ int MAPFAM::DeleteRecords(PGLOBAL g, int irc) memmove(Tpos, Spos, n);
Tpos += n;
-#ifdef DEBTRACE
- htrc("move %d bytes\n", n);
-#endif
+ if (trace)
+ htrc("move %d bytes\n", n);
+
} // endif n
if (irc == RC_OK) {
Spos = Mempos; // New start position
-#ifdef DEBTRACE
- htrc("after: Tpos=%p Spos=%p\n", Tpos, Spos);
-#endif
+ if (trace)
+ htrc("after: Tpos=%p Spos=%p\n", Tpos, Spos);
} else if (To_Fb) { // Can be NULL for deleted files
/*******************************************************************/
@@ -450,9 +448,8 @@ int MAPFAM::DeleteRecords(PGLOBAL g, int irc) return RC_FX;
} // endif
-#ifdef DEBTRACE
- htrc("done, Tpos=%p newsize=%d drc=%d\n", Tpos, n, drc);
-#endif
+ if (trace)
+ htrc("done, Tpos=%p newsize=%d drc=%d\n", Tpos, n, drc);
if (!SetEndOfFile(fp->Handle)) {
sprintf(g->Message, MSG(FUNCTION_ERROR),
@@ -484,10 +481,10 @@ void MAPFAM::CloseTableFile(PGLOBAL g) PlugCloseFile(g, To_Fb);
To_Fb = NULL; // To get correct file size in Cardinality
-#ifdef DEBTRACE
- htrc("MAP Close: closing %s count=%d\n",
- To_File, (To_Fb) ? To_Fb->Count : 0);
-#endif
+ if (trace)
+ htrc("MAP Close: closing %s count=%d\n",
+ To_File, (To_Fb) ? To_Fb->Count : 0);
+
} // end of CloseTableFile
/***********************************************************************/
|