- Move DataPath from the MYCAT catalog to the ha_connect handler. Indeed

it belongs to each tables and the catalog being share between several
  instances of CONNECT, when a query implied several tables belonging to
  different databases, some where pointing on the wrong database. This
  fix bugs occuring in queries such as:
  INSERT into db1.t1 select * from db2.t2;
  Where the t1 data file was made in db2.
modified:
  storage/connect/catalog.h
  storage/connect/connect.cc
  storage/connect/filamdbf.cpp
  storage/connect/filamdbf.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/mycat.cc
  storage/connect/mycat.h
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/reldef.cpp
  storage/connect/reldef.h
  storage/connect/tabfix.h
  storage/connect/tabfmt.cpp
  storage/connect/tabfmt.h
  storage/connect/tabmul.cpp
This commit is contained in:
Olivier Bertrand 2014-08-23 19:17:15 +02:00
commit 74a4672622
16 changed files with 113 additions and 40 deletions

View file

@ -1,5 +1,5 @@
/*************** RelDef H Declares Source Code File (.H) ***************/
/* Name: RELDEF.H Version 1.4 */
/* Name: RELDEF.H Version 1.5 */
/* */
/* (C) Copyright to the author Olivier BERTRAND 2004-2014 */
/* */
@ -79,8 +79,9 @@ class DllExport TABDEF : public RELDEF { /* Logical table descriptor */
void SetNext(PTABDEF tdfp) {Next = tdfp;}
int GetMultiple(void) {return Multiple;}
int GetPseudo(void) {return Pseudo;}
PSZ GetPath(void)
{return (Database) ? (PSZ)Database : Cat->GetDataPath();}
PSZ GetPath(void);
//PSZ GetPath(void)
// {return (Database) ? (PSZ)Database : Cat->GetDataPath();}
bool SepIndex(void) {return GetBoolCatInfo("SepIndex", false);}
bool IsReadOnly(void) {return Read_Only;}
virtual AMT GetDefType(void) {return TYPE_AM_TAB;}