mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 06:22:28 +01:00
e5729127b8
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
72 lines
2.5 KiB
C++
72 lines
2.5 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 */
|
|
|
|
/** @file user_connect.h
|
|
|
|
@brief
|
|
Declaration of the user_connect class.
|
|
|
|
@note
|
|
|
|
@see
|
|
/sql/handler.h and /storage/connect/user_connect.cc
|
|
*/
|
|
|
|
#ifdef USE_PRAGMA_INTERFACE
|
|
#pragma interface /* gcc class implementation */
|
|
#endif
|
|
|
|
/*****************************************************************************/
|
|
/* This is the global structure having all CONNECT information. */
|
|
/*****************************************************************************/
|
|
//typedef struct _global *PGLOBAL;
|
|
typedef class user_connect *PCONNECT;
|
|
typedef class ha_connect *PHC;
|
|
static int connect_done_func(void *);
|
|
|
|
/*****************************************************************************/
|
|
/* The CONNECT users. There should be one by connected users. */
|
|
/*****************************************************************************/
|
|
class user_connect
|
|
{
|
|
friend class ha_connect;
|
|
friend int connect_done_func(void *);
|
|
public:
|
|
// Constructor
|
|
user_connect(THD *thd, const char *dbn);
|
|
|
|
// Destructor
|
|
virtual ~user_connect();
|
|
|
|
// Implementation
|
|
bool user_init();
|
|
void SetHandler(ha_connect *hc);
|
|
bool CheckCleanup(void);
|
|
bool CheckQueryID(void) {return thdp->query_id > last_query_id;}
|
|
bool CheckQuery(query_id_t vid) {return last_query_id > vid;}
|
|
|
|
// Members
|
|
THD *thdp; // To the user thread
|
|
static PCONNECT to_users; // To the chain of users
|
|
PCONNECT next; // Next user in chain
|
|
PCONNECT previous; // Previous user in chain
|
|
PGLOBAL g; // The common handle to CONNECT
|
|
query_id_t last_query_id; // the latest user query id
|
|
int count; // if used by several handlers
|
|
// Statistics
|
|
ulong nrd, fnd, nfd;
|
|
ulonglong tb1;
|
|
}; // end of user_connect class definition
|
|
|