From 3a69c854c55025acc687e5852d7be5e38a38934e Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Sat, 16 Aug 2014 16:46:35 +0200 Subject: - Modifies the way indexed UPDATE/DELETE are sorted in order to execute them sorted by file position. Firstly a new value is stored in indexes to know if they are sorted, preventing to do the sorting when it is not needed. Secondly, almost all in now done in connect instead of being done by the different file access method classes. This pepares the future use of temporary files for all table types and also fix the bug that was occuring when partially using a multi-column index because of false MRR like call of position followed by unsorted rnd_pos no more using indexing. modified: storage/connect/connect.cc storage/connect/filamap.cpp storage/connect/filamap.h storage/connect/filamdbf.cpp 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/tabdos.cpp storage/connect/tabdos.h storage/connect/tabfix.h storage/connect/tabfmt.cpp storage/connect/tabfmt.h storage/connect/xindex.cpp storage/connect/xindex.h storage/connect/xtable.h --- storage/connect/tabdos.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'storage/connect/tabdos.h') diff --git a/storage/connect/tabdos.h b/storage/connect/tabdos.h index 7f2c4f5e7ee..e49f3188795 100644 --- a/storage/connect/tabdos.h +++ b/storage/connect/tabdos.h @@ -136,6 +136,7 @@ class DllExport TDBDOS : public TDBASE { virtual PTDB CopyOne(PTABS t); virtual void ResetDB(void) {Txfp->Reset();} virtual bool IsUsingTemp(PGLOBAL g); + virtual bool IsIndexed(void) {return Indxd;} virtual void ResetSize(void) {MaxSize = Cardinal = -1;} virtual int ResetTableOpt(PGLOBAL g, bool dop, bool dox); virtual int MakeBlockValues(PGLOBAL g); @@ -176,6 +177,7 @@ class DllExport TDBDOS : public TDBASE { bool GetDistinctColumnValues(PGLOBAL g, int nrec); protected: + virtual bool PrepareWriting(PGLOBAL g); PBF CheckBlockFilari(PGLOBAL g, PXOB *arg, int op, bool *cnv); // Members @@ -185,6 +187,7 @@ class DllExport TDBDOS : public TDBASE { PFIL SavFil; // Saved hidden filter char *To_Line; // Points to current processed line bool Abort; // TRUE when aborting UPDATE/DELETE + bool Indxd; // TRUE for indexed UPDATE/DELETE int Lrecl; // Logical Record Length int AvgLen; // Logical Record Average Length //int Xeval; // BlockTest return value -- cgit v1.2.1