mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
213ecbbb4f
catalog data path had not been set. This was added into ha_connect::info. modified: storage/connect/ha_connect.cc - All the functions querying table options could return information from the wrong table when several CONNECT tables were used in the same query (for instance joined together) This was because they belonged to the catalog class that is shared between all tables in the same query. They have been moved from the catalog class to the TABDEF/RELDEF class that is attached to each table. This was a major potential bug. modified: storage/connect/catalog.h storage/connect/filamvct.cpp storage/connect/filamzip.cpp storage/connect/mycat.cc storage/connect/mycat.h storage/connect/reldef.cpp storage/connect/reldef.h storage/connect/tabdos.cpp storage/connect/tabfmt.cpp storage/connect/tabmul.cpp storage/connect/tabmysql.cpp storage/connect/taboccur.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/tabsys.cpp storage/connect/tabtbl.cpp storage/connect/tabutil.cpp storage/connect/tabvct.cpp storage/connect/tabwmi.cpp storage/connect/tabxcl.cpp storage/connect/tabxml.cpp storage/connect/xindex.cpp - Prepare indexing of MYSQL/ODBC tables (as does FEDERATED) (Not implemented yet) modified: storage/connect/ha_connect.cc storage/connect/ha_connect.h storage/connect/mycat.cc storage/connect/mycat.h - Typo modified: storage/connect/plgdbutl.cpp
76 lines
3 KiB
C++
76 lines
3 KiB
C++
/* Copyright (C) Olivier Bertrand 2004 - 2013
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; version 2 of the License.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
/**************** MYCAT H Declares Source Code File (.H) ***************/
|
|
/* Name: MYCAT.H Version 2.3 */
|
|
/* */
|
|
/* This file contains the CONNECT plugin MYCAT class definitions. */
|
|
/***********************************************************************/
|
|
#ifndef __MYCAT__H
|
|
#define __MYCAT__H
|
|
|
|
#include "block.h"
|
|
#include "catalog.h"
|
|
|
|
// Possible value for catalog functions
|
|
#define FNC_NO (1 << 0) // Not a catalog table
|
|
#define FNC_COL (1 << 1) // Column catalog function
|
|
#define FNC_TABLE (1 << 2) // Table catalog function
|
|
#define FNC_DSN (1 << 3) // Data Source catalog function
|
|
#define FNC_DRIVER (1 << 4) // Column catalog function
|
|
#define FNC_NIY (1 << 5) // Catalog function NIY
|
|
|
|
typedef class ha_connect *PHC;
|
|
|
|
TABTYPE GetTypeID(const char *type);
|
|
bool IsFileType(TABTYPE type);
|
|
bool IsExactType(TABTYPE type);
|
|
bool IsTypeNullable(TABTYPE type);
|
|
bool IsTypeFixed(TABTYPE type);
|
|
bool IsTypeIndexable(TABTYPE type);
|
|
int GetIndexType(TABTYPE type);
|
|
uint GetFuncID(const char *func);
|
|
|
|
/***********************************************************************/
|
|
/* MYCAT: class for managing the CONNECT plugin DB items. */
|
|
/***********************************************************************/
|
|
class MYCAT : public CATALOG {
|
|
public:
|
|
MYCAT(PHC hc); // Constructor
|
|
|
|
// Implementation
|
|
PHC GetHandler(void) {return Hc;}
|
|
void SetHandler(PHC hc) {Hc= hc;}
|
|
|
|
// Methods
|
|
void Reset(void);
|
|
void SetDataPath(PGLOBAL g, const char *path)
|
|
{SetPath(g, &DataPath, path);}
|
|
bool StoreIndex(PGLOBAL g, PTABDEF defp) {return false;} // Temporary
|
|
PRELDEF GetTableDesc(PGLOBAL g, LPCSTR name,
|
|
LPCSTR type, PRELDEF *prp = NULL);
|
|
PTDB GetTable(PGLOBAL g, PTABLE tablep,
|
|
MODE mode = MODE_READ, LPCSTR type = NULL);
|
|
void ClearDB(PGLOBAL g);
|
|
|
|
protected:
|
|
PRELDEF MakeTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am);
|
|
void SetPath(PGLOBAL g, LPCSTR *datapath, const char *path);
|
|
|
|
// Members
|
|
ha_connect *Hc; // The Connect handler
|
|
}; // end of class MYCAT
|
|
|
|
#endif /* __MYCAT__H */
|