mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
- 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
This commit is contained in:
parent
78b1bdd2ba
commit
3a69c854c5
19 changed files with 591 additions and 913 deletions
|
|
@ -899,9 +899,9 @@ int TDBCSV::ReadBuffer(PGLOBAL g)
|
|||
} // end of ReadBuffer
|
||||
|
||||
/***********************************************************************/
|
||||
/* Data Base write routine CSV file access method. */
|
||||
/* Prepare the line to write. */
|
||||
/***********************************************************************/
|
||||
int TDBCSV::WriteDB(PGLOBAL g)
|
||||
bool TDBCSV::PrepareWriting(PGLOBAL g)
|
||||
{
|
||||
char sep[2], qot[2];
|
||||
int i, nlen, oldlen = strlen(To_Line);
|
||||
|
|
@ -912,7 +912,7 @@ int TDBCSV::WriteDB(PGLOBAL g)
|
|||
|
||||
// Before writing the line we must check its length
|
||||
if ((nlen = CheckWrite(g)) < 0)
|
||||
return RC_FX;
|
||||
return true;
|
||||
|
||||
// Before writing the line we must make it
|
||||
sep[0] = Sep;
|
||||
|
|
@ -975,6 +975,18 @@ int TDBCSV::WriteDB(PGLOBAL g)
|
|||
if (trace > 1)
|
||||
htrc("Write: line is=%s", To_Line);
|
||||
|
||||
return false;
|
||||
} // end of PrepareWriting
|
||||
|
||||
/***********************************************************************/
|
||||
/* Data Base write routine CSV file access method. */
|
||||
/***********************************************************************/
|
||||
int TDBCSV::WriteDB(PGLOBAL g)
|
||||
{
|
||||
// Before writing the line we must check and prepare it
|
||||
if (PrepareWriting(g))
|
||||
return RC_FX;
|
||||
|
||||
/*********************************************************************/
|
||||
/* Now start the writing process. */
|
||||
/*********************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue