diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2014-03-10 18:29:04 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2014-03-10 18:29:04 +0100 |
commit | e5729127b8a50a0e553fd8b87b2683e4a684dfcc (patch) | |
tree | e1aa801ddbce432955725707a90e0be9b8d8845f /storage/connect/table.cpp | |
parent | 126bb34513f34eba97598d2357bfc1c2fbf594b4 (diff) | |
download | mariadb-git-e5729127b8a50a0e553fd8b87b2683e4a684dfcc.tar.gz |
- NOTE: an experimental implementation of MRR was done but not kept
in this version. Sure enough, it never caused any improvement in
the execution speed and rather caused a small increase of execution
time. This is probably because values are sorted by rowid in each
range of CONNECT indexes. This could be reconsidered if a customer
have a need for processing very big files.
- Fix a bug in ha_connect::CheckCond. The negated form of BETWEEN and
IS NULL operators was not recognized.
modified:
storage/connect/ha_connect.cc
- Add long jump initialization in CntReadNext. This was causing a server
crash when an error occured in a ReadColumn.
modified:
storage/connect/connect.cc
- General cleanup of CONNECT source code eliminating all code not used by
CONNECT, including the MRR test code (saved separately).
modified:
storage/connect/catalog.h
storage/connect/colblk.cpp
storage/connect/colblk.h
storage/connect/connect.cc
storage/connect/connect.h
storage/connect/domdoc.h
storage/connect/filamap.cpp
storage/connect/filamap.h
storage/connect/filamdbf.h
storage/connect/filamfix.cpp
storage/connect/filamfix.h
storage/connect/filamtxt.cpp
storage/connect/filamtxt.h
storage/connect/filamvct.cpp
storage/connect/filamvct.h
storage/connect/filamzip.cpp
storage/connect/filamzip.h
storage/connect/global.h
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
storage/connect/myconn.h
storage/connect/plgcnx.h
storage/connect/plgdbsem.h
storage/connect/plugutil.c
storage/connect/preparse.h
storage/connect/reldef.cpp
storage/connect/reldef.h
storage/connect/tabcol.h
storage/connect/tabdos.cpp
storage/connect/tabdos.h
storage/connect/tabfix.cpp
storage/connect/tabfmt.cpp
storage/connect/tabfmt.h
storage/connect/table.cpp
storage/connect/tabmac.h
storage/connect/tabmul.h
storage/connect/tabmysql.cpp
storage/connect/tabmysql.h
storage/connect/taboccur.h
storage/connect/tabodbc.cpp
storage/connect/tabodbc.h
storage/connect/tabsys.cpp
storage/connect/tabsys.h
storage/connect/tabtbl.cpp
storage/connect/tabtbl.h
storage/connect/tabutil.h
storage/connect/tabvct.cpp
storage/connect/tabvct.h
storage/connect/tabwmi.cpp
storage/connect/tabwmi.h
storage/connect/tabxml.cpp
storage/connect/tabxml.h
storage/connect/user_connect.cc
storage/connect/user_connect.h
storage/connect/valblk.cpp
storage/connect/valblk.h
storage/connect/value.cpp
storage/connect/value.h
storage/connect/xindex.cpp
storage/connect/xindex.h
storage/connect/xobject.cpp
storage/connect/xobject.h
storage/connect/xtable.h
Diffstat (limited to 'storage/connect/table.cpp')
-rw-r--r-- | storage/connect/table.cpp | 117 |
1 files changed, 8 insertions, 109 deletions
diff --git a/storage/connect/table.cpp b/storage/connect/table.cpp index 37035ed752d..9749673ad71 100644 --- a/storage/connect/table.cpp +++ b/storage/connect/table.cpp @@ -36,27 +36,6 @@ extern "C" int trace; // The general trace value void NewPointer(PTABS, void *, void *); void AddPointer(PTABS, void *); -/* ---------------------------- class TBX ---------------------------- */ - -/***********************************************************************/ -/* TBX public constructors. */ -/***********************************************************************/ -TBX::TBX(void) - { - Use = USE_NO; - To_Orig = NULL; - To_Filter = NULL; - } // end of TBX constructor - -TBX::TBX(PTBX txp) - { - Use = txp->Use; - To_Orig = txp; - To_Filter = NULL; - } // end of TBX copy constructor - -// Methods - /* ---------------------------- class TDB ---------------------------- */ /***********************************************************************/ @@ -64,6 +43,9 @@ TBX::TBX(PTBX txp) /***********************************************************************/ TDB::TDB(PTABDEF tdp) : Tdb_No(++Tnum) { + Use = USE_NO; + To_Orig = NULL; + To_CondFil = NULL; Next = NULL; Name = (tdp) ? tdp->GetName() : NULL; To_Table = NULL; @@ -72,8 +54,11 @@ TDB::TDB(PTABDEF tdp) : Tdb_No(++Tnum) Mode = MODE_READ; } // end of TDB standard constructor -TDB::TDB(PTDB tdbp) : TBX(tdbp), Tdb_No(++Tnum) +TDB::TDB(PTDB tdbp) : Tdb_No(++Tnum) { + Use = tdbp->Use; + To_Orig = tdbp; + To_CondFil = NULL; Next = NULL; Name = tdbp->Name; To_Table = tdbp->To_Table; @@ -82,92 +67,6 @@ TDB::TDB(PTDB tdbp) : TBX(tdbp), Tdb_No(++Tnum) Mode = tdbp->Mode; } // end of TDB copy constructor -/***********************************************************************/ -/* OpenTable: Call AM open routine. */ -/***********************************************************************/ -bool TDB::OpenTable(PGLOBAL g, PSQL sqlp, MODE mode) - { - if (trace) - htrc("Open Tdb_No=%d use=%d type=%d tdb.Mode=%d mode=%d\n", - Tdb_No, Use, GetAmType(), Mode, mode); - - switch (Use) { - case USE_LIN: - /*****************************************************************/ - /* If table is read/only, only MODE_READ is allowed. */ - /*****************************************************************/ - if (IsReadOnly() && mode != MODE_READ) { - strcpy(g->Message, MSG(READ_ONLY)); - return true; - } // endif ReadOnly - - /*****************************************************************/ - /* This could be done in any order. */ - /* Note: for not Read only first table in open in that mode. */ - /*****************************************************************/ - if (Next) - Next->OpenTable(g, sqlp, MODE_READ); - - Mode = mode; - - /*****************************************************************/ - /* Pre-opening is done, allocate select buffers now. */ - /*****************************************************************/ - Use = USE_READY; - break; - - case USE_READY: - /*****************************************************************/ - /* This is to open files in reverse order. */ - /*****************************************************************/ - if (Next) - if (Next->OpenTable(g, sqlp, mode)) - return true; - - /*****************************************************************/ - /* This was moved after filter conversion so filtering can be */ - /* done when making index tables for DOS files. */ - /* Also it was moved after allocating select buffers so some */ - /* data can be pre-read during open to allow storage sorting. */ - /*****************************************************************/ - if (OpenDB(g)) // Do open the table file - return true; - - Use = USE_OPEN; - break; - - case USE_OPEN: - /*****************************************************************/ - /* Table is already open. */ - /* Call open routine that will just "rewind" the files. */ - /*****************************************************************/ - if (OpenDB(g)) // Rewind the table file - return true; - - break; - - default: - sprintf(g->Message, MSG(TDB_USE_ERROR), Use); - return true; - } // endswitch Use - - return false; - } // end of OpenTable - -/***********************************************************************/ -/* CloseTable: Close a table of any AM type. */ -/***********************************************************************/ -void TDB::CloseTable(PGLOBAL g) - { - if (trace) - htrc("CloseTable: tdb_no %d use=%d amtype=%d am.Mode=%d\n", - Tdb_No, Use, GetAmType(), Mode); - - CloseDB(g); - Use = USE_READY; // x'7FFD' - Mode = MODE_ANY; - } // end of CloseTable - // Methods /***********************************************************************/ @@ -179,7 +78,7 @@ int TDB::RowNumber(PGLOBAL g, bool b) return 0; } // end of RowNumber -PTBX TDB::Copy(PTABS t) +PTDB TDB::Copy(PTABS t) { PTDB tp, tdb1, tdb2 = NULL, outp = NULL; //PGLOBAL g = t->G; // Is this really useful ??? |