mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
f930f4eda9
a temporary file should be used for UPDATE/DELETE of file tables. Also use the "sorted" argument of index_init to help decide if sorting of positions must be done. modified: storage/connect/checklvl.h storage/connect/connect.cc storage/connect/connect.h storage/connect/filamdbf.cpp storage/connect/filamfix.cpp storage/connect/filamfix.h storage/connect/filamtxt.cpp storage/connect/ha_connect.cc storage/connect/mysql-test/connect/r/part_table.result storage/connect/plgdbsem.h storage/connect/plgdbutl.cpp storage/connect/reldef.cpp storage/connect/tabdos.cpp storage/connect/tabdos.h storage/connect/tabfix.cpp storage/connect/tabfmt.cpp storage/connect/tabvct.cpp storage/connect/tabvct.h storage/connect/xindex.cpp - Fix a bug in TDBASE::ColDB that caused some special columns not to be found in the column list and reallocated without their Value causing a crash of some queries. modified: storage/connect/table.cpp - Fix a bug causing RestoreNrec to be called before closing a table causing a wrong value given to Spos modified: storage/connect/tabdos.cpp storage/connect/xindex.cpp - Add a new CONNECT global variable connect_exact_info. Set to ON, it tells CONNECT to return exact record numbers on info queries. If OFF it just gives an estimate. In version 10.0.13 this was unconditionally ON and caused info queries on remote tables to be extremely long and was the subject of MDEV-6612. modified: storage/connect/ha_connect.cc storage/connect/tabdos.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp
76 lines
3.6 KiB
C++
76 lines
3.6 KiB
C++
/* Copyright (C) Olivier Bertrand 2004 - 2011
|
|
|
|
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 */
|
|
|
|
/**************** Cnt H Declares Source Code File (.H) *****************/
|
|
/* Name: CONNECT.H Version 2.4 */
|
|
/* This file contains the some based classes declares. */
|
|
/***********************************************************************/
|
|
#include "filamtxt.h"
|
|
#include "tabdos.h"
|
|
|
|
//typedef struct _tabdesc *PTABD; // For friend setting
|
|
typedef struct _xinfo *PXF;
|
|
typedef struct _create_xinfo *PCXF;
|
|
typedef class ha_connect *PHC;
|
|
typedef class TDBDOX *PTDBDOX;
|
|
|
|
/****************************************************************************/
|
|
/* CONNECT functions called externally. */
|
|
/****************************************************************************/
|
|
bool CntCheckDB(PGLOBAL g, PHC handler, const char *pathname);
|
|
PTDB CntGetTDB(PGLOBAL g, const char *name, MODE xmod, PHC);
|
|
bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE, char *, char *, bool, PHC);
|
|
bool CntRewindTable(PGLOBAL g, PTDB tdbp);
|
|
int CntCloseTable(PGLOBAL g, PTDB tdbp, bool nox, bool abort);
|
|
int CntIndexInit(PGLOBAL g, PTDB tdbp, int id, bool sorted);
|
|
RCODE CntReadNext(PGLOBAL g, PTDB tdbp);
|
|
RCODE CntIndexRead(PGLOBAL g, PTDB, OPVAL op, const void *k, int n, bool mrr);
|
|
RCODE CntWriteRow(PGLOBAL g, PTDB tdbp);
|
|
RCODE CntUpdateRow(PGLOBAL g, PTDB tdbp);
|
|
RCODE CntDeleteRow(PGLOBAL g, PTDB tdbp, bool all);
|
|
bool CntInfo(PGLOBAL g, PTDB tdbp, PXF info);
|
|
int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len,
|
|
bool *incl, key_part_map *kmap);
|
|
PGLOBAL CntExit(PGLOBAL g);
|
|
|
|
/***********************************************************************/
|
|
/* Definition of classes XKPDEF, DOXDEF, TDBDOX */
|
|
/* These classes purpose is chiefly to access protected items! */
|
|
/***********************************************************************/
|
|
class DOXDEF: public DOSDEF {
|
|
friend int CntIndexInit(PGLOBAL, PTDB, int, bool);
|
|
}; // end of class DOXDEF
|
|
|
|
/***********************************************************************/
|
|
/* This is the DOS/UNIX Access Method base class declaration. */
|
|
/***********************************************************************/
|
|
class TDBDOX: public TDBDOS {
|
|
friend int MakeIndex(PGLOBAL, PTDB, PIXDEF);
|
|
friend int CntCloseTable(PGLOBAL, PTDB, bool, bool);
|
|
friend int CntIndexInit(PGLOBAL, PTDB, int, bool);
|
|
friend RCODE CntIndexRead(PGLOBAL, PTDB, OPVAL, const void*, int, bool);
|
|
friend RCODE CntDeleteRow(PGLOBAL, PTDB, bool);
|
|
friend int CntIndexRange(PGLOBAL, PTDB, const uchar**, uint*,
|
|
bool*, key_part_map*);
|
|
friend class ha_connect;
|
|
}; // end of class TDBDOX
|
|
|
|
class XKPDEF: public KPARTDEF {
|
|
friend class TDBDOX;
|
|
friend class ha_connect;
|
|
friend int CntIndexInit(PGLOBAL, PTDB, int, bool);
|
|
public:
|
|
XKPDEF(const char *name, int n) : KPARTDEF((PSZ)name, n) {}
|
|
}; // end of class XKPDEF
|