mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
- Delete ALL or truncate must not be done using file mapping.
modified: storage/connect/tabdos.cpp storage/connect/tabfix.cpp storage/connect/tabvct.cpp
This commit is contained in:
@@ -721,7 +721,11 @@ bool TDBDOS::OpenDB(PGLOBAL g)
|
|||||||
return false;
|
return false;
|
||||||
} // endif use
|
} // endif use
|
||||||
|
|
||||||
if (Txfp->Blocked && (Mode == MODE_DELETE ||
|
if (Mode == MODE_DELETE && !Next && Txfp->GetAmType() != TYPE_AM_DOS) {
|
||||||
|
// Delete all lines. Not handled in MAP or block mode
|
||||||
|
Txfp = new(g) DOSFAM((PDOSDEF)To_Def);
|
||||||
|
Txfp->SetTdbp(this);
|
||||||
|
} else if (Txfp->Blocked && (Mode == MODE_DELETE ||
|
||||||
(Mode == MODE_UPDATE && PlgGetUser(g)->UseTemp != TMP_NO))) {
|
(Mode == MODE_UPDATE && PlgGetUser(g)->UseTemp != TMP_NO))) {
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
/* Delete is not currently handled in block mode neither Update */
|
/* Delete is not currently handled in block mode neither Update */
|
||||||
|
@@ -249,6 +249,12 @@ bool TDBFIX::OpenDB(PGLOBAL g)
|
|||||||
return false;
|
return false;
|
||||||
} // endif use
|
} // endif use
|
||||||
|
|
||||||
|
if (Mode == MODE_DELETE && !Next && Txfp->GetAmType() == TYPE_AM_MAP) {
|
||||||
|
// Delete all lines. Not handled in MAP mode
|
||||||
|
Txfp = new(g) FIXFAM((PDOSDEF)To_Def);
|
||||||
|
Txfp->SetTdbp(this);
|
||||||
|
} // endif Mode
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
/* Call Cardinality to calculate Block in the case of Func queries. */
|
/* Call Cardinality to calculate Block in the case of Func queries. */
|
||||||
/* and also in the case of multiple tables. */
|
/* and also in the case of multiple tables. */
|
||||||
|
@@ -299,18 +299,11 @@ bool TDBVCT::OpenDB(PGLOBAL g)
|
|||||||
} // endif Use
|
} // endif Use
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
/* Insert is not handled using file mapping. */
|
/* Delete all is not handled using file mapping. */
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
if (Mode == MODE_INSERT && !((PVCTDEF)To_Def)->GetEstimate() &&
|
if (Mode == MODE_DELETE && !Next && Txfp->GetAmType() == TYPE_AM_MAP) {
|
||||||
Txfp->GetAmType() == TYPE_AM_VMP) {
|
|
||||||
if (!((PVCTFAM)Txfp)->Split) {
|
|
||||||
Txfp = new(g) VCTFAM((PVCTDEF)To_Def);
|
Txfp = new(g) VCTFAM((PVCTDEF)To_Def);
|
||||||
Txfp->SetTdbp(this);
|
Txfp->SetTdbp(this);
|
||||||
} else {
|
|
||||||
Txfp = new(g) VECFAM((PVCTDEF)To_Def);
|
|
||||||
Txfp->SetTdbp(this);
|
|
||||||
} // endif Split
|
|
||||||
|
|
||||||
} // endif Mode
|
} // endif Mode
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
|
Reference in New Issue
Block a user