diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2014-08-23 19:17:15 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2014-08-23 19:17:15 +0200 |
commit | 74a46726227b5f34dedb28ff6d7a4d81b157d764 (patch) | |
tree | 9c2d6fdebca4cf11ccb3b65c02a27633c1010212 /storage/connect/mycat.cc | |
parent | f930f4eda9dd849b48e67eaecc8c130bb9310107 (diff) | |
download | mariadb-git-74a46726227b5f34dedb28ff6d7a4d81b157d764.tar.gz |
- 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
Diffstat (limited to 'storage/connect/mycat.cc')
-rw-r--r-- | storage/connect/mycat.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc index ca09e877b1a..660e2adec2f 100644 --- a/storage/connect/mycat.cc +++ b/storage/connect/mycat.cc @@ -405,9 +405,9 @@ PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info) CATALOG::CATALOG(void) { #if defined(WIN32) - DataPath= ".\\"; +//DataPath= ".\\"; #else // !WIN32 - DataPath= "./"; +//DataPath= "./"; #endif // !WIN32 memset(&Ctb, 0, sizeof(CURTAB)); Cbuf= NULL; @@ -433,6 +433,7 @@ void MYCAT::Reset(void) { } // end of Reset +#if 0 /***********************************************************************/ /* This function sets the current database path. */ /***********************************************************************/ @@ -463,6 +464,7 @@ void MYCAT::SetPath(PGLOBAL g, LPCSTR *datapath, const char *path) } // endif path } // end of SetDataPath +#endif // 0 /***********************************************************************/ /* GetTableDesc: retrieve a table descriptor. */ @@ -560,7 +562,7 @@ PTDB MYCAT::GetTable(PGLOBAL g, PTABLE tablep, MODE mode, LPCSTR type) printf("tdb=%p type=%s\n", tdp, tdp->GetType()); if (tablep->GetQualifier()) - SetPath(g, &tdp->Database, tablep->GetQualifier()); + tdp->Database = SetPath(g, tablep->GetQualifier()); tdbp= tdp->GetTable(g, mode); } // endif tdp |