diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2013-03-08 22:48:27 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2013-03-08 22:48:27 +0100 |
commit | c7b95cb9dfa045c700c6ac83a14b28bf88b206c0 (patch) | |
tree | 0a98b78f1e3f5e0ff2318924ac5dd43ab5445580 /storage | |
parent | 3342df63ef34b217234f01a79a27c2f8725d3c6d (diff) | |
download | mariadb-git-c7b95cb9dfa045c700c6ac83a14b28bf88b206c0.tar.gz |
- Delete ALL or truncate must not be done using file mapping.
modified:
storage/connect/tabdos.cpp
storage/connect/tabfix.cpp
storage/connect/tabvct.cpp
Diffstat (limited to 'storage')
-rw-r--r-- | storage/connect/tabdos.cpp | 6 | ||||
-rw-r--r-- | storage/connect/tabfix.cpp | 6 | ||||
-rw-r--r-- | storage/connect/tabvct.cpp | 15 |
3 files changed, 15 insertions, 12 deletions
diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp index be343690f08..721283d42e9 100644 --- a/storage/connect/tabdos.cpp +++ b/storage/connect/tabdos.cpp @@ -721,7 +721,11 @@ bool TDBDOS::OpenDB(PGLOBAL g) return false; } // 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))) { /*******************************************************************/ /* Delete is not currently handled in block mode neither Update */ diff --git a/storage/connect/tabfix.cpp b/storage/connect/tabfix.cpp index 9ce04a47410..1f2fb58d153 100644 --- a/storage/connect/tabfix.cpp +++ b/storage/connect/tabfix.cpp @@ -249,6 +249,12 @@ bool TDBFIX::OpenDB(PGLOBAL g) return false; } // 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. */ /* and also in the case of multiple tables. */ diff --git a/storage/connect/tabvct.cpp b/storage/connect/tabvct.cpp index c06f7bbead1..29e0b89ebd3 100644 --- a/storage/connect/tabvct.cpp +++ b/storage/connect/tabvct.cpp @@ -299,18 +299,11 @@ bool TDBVCT::OpenDB(PGLOBAL g) } // 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() && - Txfp->GetAmType() == TYPE_AM_VMP) { - if (!((PVCTFAM)Txfp)->Split) { - Txfp = new(g) VCTFAM((PVCTDEF)To_Def); - Txfp->SetTdbp(this); - } else { - Txfp = new(g) VECFAM((PVCTDEF)To_Def); - Txfp->SetTdbp(this); - } // endif Split - + if (Mode == MODE_DELETE && !Next && Txfp->GetAmType() == TYPE_AM_MAP) { + Txfp = new(g) VCTFAM((PVCTDEF)To_Def); + Txfp->SetTdbp(this); } // endif Mode /*********************************************************************/ |